Skip to content

Instantly share code, notes, and snippets.

@mfikes
Last active February 8, 2017 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfikes/2db7e33c6494e6b0950b02e7dc5b0df6 to your computer and use it in GitHub Desktop.
Save mfikes/2db7e33c6494e6b0950b02e7dc5b0df6 to your computer and use it in GitHub Desktop.
time
#!/usr/bin/env planck
(ns march.core
(:require
[clojure.string :as string]
[planck.core :refer [spit]]
[planck.shell :as shell]))
(def start-commit "r1.8.51")
(def out-file "/Users/mfikes/timings.edn")
(defn get-commits
[start-commit]
(shell/sh "git" "checkout" "master")
(-> (shell/sh "git" "rev-list" (str start-commit "..HEAD") "--reverse")
:out
(string/split "\n")))
(defn get-timing
[commit]
(shell/sh "git" "checkout" commit)
(shell/sh "script/clean")
(shell/sh "script/bootstrap")
(let [start (system-time)
result (shell/sh "script/test-self-parity")
timing (if (== 0 (:exit result))
(- (system-time) start)
:not-available)]
(prn [commit timing])
timing))
(spit out-file
(pr-str
(->> start-commit
get-commits
(map (fn [commit]
[commit (get-timing commit)]))
(remove (fn [[commit timing]]
(= :not-available timing))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment