Skip to content

Instantly share code, notes, and snippets.

@Vaguery
Last active April 7, 2017 00:06
Show Gist options
  • Save Vaguery/02562e901b8e0ec78c744ba28d14b8f3 to your computer and use it in GitHub Desktop.
Save Vaguery/02562e901b8e0ec78c744ba28d14b8f3 to your computer and use it in GitHub Desktop.
Using criterium to benchmark every fact in a midge-tested repo
;; lein repl
(use 'midje.repl)
(load-facts 'push.type.*)
(use 'criterium.core)
(defn benchmark-fact
[fact]
(println "\n\n")
(println (:midje/namespace (meta fact)))
(println (:midje/file (meta fact)))
(println (:midje/description (meta fact)))
(with-progress-reporting
(quick-bench (check-one-fact fact) :verbose)
))
(map benchmark-fact (fetch-facts))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment