 
 (defquery store-data-samples [ samples ]
   (doseq [ sample samples ]
-    (log/debug "Inserting sample: " sample)
+    (log/trace "Inserting sample: " sample)
     (let [series-id (intern-series-name (:series_name sample))]
       (check-latest-series-time series-id (:t sample))
       (jdbc/insert! *db* :sample

      (app req))))

(defn call-with-query-logging [ name actual-args fn ]
  (log/debug "query" name actual-args)
  (let [begin-t (. System (nanoTime))
        result (fn)]
    (log/debug "query time" name "-" (/ (- (. System (nanoTime)) begin-t) 1000000.0))

      latest-t
      (let [query-latest-t (query-series-latest-sample-time series-name)]
        (swap! latest-sample-times assoc series-id query-latest-t)
        (log/info "Latest sample times from DB" @latest-sample-times)
        query-latest-t))))

(defn restrict-to-series [ samples series-name ]
