   `(let [start# (. System (nanoTime))]
      ~expr
      (/ (double (- (. System (nanoTime)) start#)) 1000000.0)))
-
-(defn spy [msg x]
-  (println msg x)
-  x)
 
 (def dataset-map
   (into {} (map (fn [ds] [(:key ds) ds]) benchmark-data/datasets)))

  (doseq [{:keys [id result]} results]
    (println (report (:desc (test-map id)) result))) )

(def ^:private argspec
  [["-o" "--output FILE" "Output file" :default "bench.edn"]
   ["-h" "--help" "Show help"]
   ["-r" "--input FILE" "Read and print results from FILE"]
   ["-i" "--include TAG" "Run benchmarks with TAG (can be used multiple times)" :default [] :assoc-fn (fn [m k v] (update-in m [k] conj v))]]) 


        (:input options) (print-results (edn/read-string (slurp (:input options))))
        :else (let [xena (h2/create-xenadb dbfile)
                    results (atom [])]
                (when-let [error (mkdir (io/file "." ".benchmark"))]
                  (binding [*out* *err*]
                    (println error)
                    (System/exit 1)))
                (doseq [{:keys [id desc params body]} (filter test-filter tests)]
                  (let [params (if (:load options)
                                 (edn/read-string
                                   (slurp (io/file "." ".benchmark" (name id))))
                                 (params))
                        result (apply body xena params)]
                    (when (not (:load options))
                      (spit (io/file "." ".benchmark" (name id)) (pr-str params)))
                    (swap! results conj {:id id :result result})
                    (println (report desc result))))
                (spit (:output options) (pr-str @results)))))
