Created
November 27, 2016 08:44
-
-
Save rauhs/622aaf526ff3c9e53e88190b7490df23 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(defn startup-time | |
[] | |
(into [] | |
(for [v [18 19]] | |
(let [jar (case v | |
18 "/tmp/clojure-1.8.0.jar" | |
19 "/tmp/clojure-1.9.0-alpha14.jar") | |
jvm-opts ["-Xverify:none" | |
"-XX:+TieredCompilation" | |
"-XX:TieredStopAtLevel=1"] | |
opts (concat ["time" "-f" "%e" "java"] | |
jvm-opts | |
["-cp" jar "clojure.main" "-e" "(println :hi)"]) | |
{:keys [out err]} | |
(apply sh/sh opts)] | |
(assert (= out ":hi\n")) | |
[v (Double/parseDouble err)])))) | |
#_(startup-time) | |
#_(:err (sh/sh "time" "-f" "%e" "/tmp/lumo" "-e" "(println :hi)")) | |
;; => 0.22 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment