             [validation-benchmark.edn :refer [reader->seq
                                               resource-reader]])
   (:gen-class))
-
-
-(declare summarize)
 
 
 (def bench-out-path "target/criterium.output")

                   (read-string (slurp results-path))
                   chart-path)
    (let [benchmarks (prepare-benchmarks alternatives inputs)
          results (run-benchmarks benchmarks true)]
      (save-results results results-path)
      (check-results alternatives inputs results)
      (final-summary groups results chart-path))))

      (require [lib-ns])))


(defn run-benchmarks [benchmarks bench-fn]
  (let [flattened (for [[lib-name lib-data] benchmarks
                        [test-name test-data] lib-data
                        [valid? {test-fn :fn inputs :inputs}] test-data]
                    [[lib-name test-name valid?] [test-fn inputs]])]
    (println "Running benchmarks.")
    (loop [benchmarks-with-results benchmarks
           [[k [test-fn test-data]] & r] flattened]
      (if (some? k)
        (do
          (println " " k)
          (recur (->> (fn [] (doall (map test-fn test-data)))
                      (bench-fn)
                      (assoc-in benchmarks-with-results k))
                 r))
        benchmarks-with-results))))
