Last active
February 8, 2017 22:15
-
-
Save mfikes/2db7e33c6494e6b0950b02e7dc5b0df6 to your computer and use it in GitHub Desktop.
time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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