         ~@body)))
 
 
-(defn check-results [alternatives inputs results]
-  (println "Checking results.")
-  (let [lib-names (keys alternatives)
-        test-names (keys inputs)]
-    (doseq [test-name test-names
-            valid? [:valid :invalid]]
-      (println " " test-name valid?)
-      (let [test-results (->> lib-names
-                              (map #(vector %
-                                            (get-in results
-                                                    [% test-name valid? :results])))
-                              (remove (comp nil? second))
-                              (into {}))]
-        (doseq [lib-name lib-names
-                :let [results' (get-in results
-                                       [lib-name test-name valid? :results])]]
-          (when-not (empty? results')
-            (assert (every? #(every? true? %) results')
-                    (str "invalid results for " lib-name))))))))
+(defn assert-result [f msg]
+  (fn [& args]
+    (let [r (apply f args)]
+      (assert r (format msg args))
+      r)))
 
 
 (defn final-summary [groups results chart-path]

                               (get test-name)
                               (var-get))]
      [test-name
       {:valid {:inputs valids
                :fn (wrapper test-fn true)}
        :invalid {:inputs invalids
                  :fn (wrapper test-fn false)}}])))


(defn prepare-benchmarks [alternatives inputs]
  (->> (for [[lib-name lib-ns] alternatives]
         [lib-name
          (->> (for [[test-name test-data] inputs]
                 (prepare-benchmark-for-lib lib-ns
                                            test-name
                                            test-data))
               (into {}))])


(defn summarize [results]
  (-> results
      (select-keys [:total-time :samples])
      (merge {:system {:os (str (get-in results
                                        [:os-details :name])
                                " "
