Last active
December 19, 2015 07:39
-
-
Save fbmnds/5920523 to your computer and use it in GitHub Desktop.
Summary plot
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
| (use '(incanter core stats charts)) | |
| ;; number of processed lines: | |
| ;; | |
| (def n '(10 100 1000 10000 20000 40000 60000 80000 100000)) | |
| ;; | |
| ;; runtime per volume (# of lines) from measure: | |
| ;; | |
| (def t-in-ms '(0.19248 1.718639 77.929438 5387.727517 25963.054403 137354.431354 303994.793612 551822.123044 737414.582849)) | |
| (def t-in-ms-1-5-1 '(1.70966 1.606149 56.427781 4738.202508 19550.828503 79468.576165 203903.7885 377308.347139 1013598.323447)) | |
| (def t-in-ms-clr '(6.0 1.0 93.0 8440.0 34830.0 146362.0 328953.0 642148.0 963323.0)) | |
| ;; calculate runtime per line: | |
| ;; | |
| (defn norm [s1 s2] (map #(/ (% 1) (% 0)) (for [i (range (count s1))] [(nth s1 i) (nth s2 i)]))) | |
| ;; name mapping for the plot legend: | |
| ;; | |
| (def clj-java-1-5-0-RC2 (norm n t-in-ms)) | |
| (def clj-java-1-5-1 (norm n t-in-ms-1-5-1)) | |
| (def clj-clr-1-4-1 (norm n t-in-ms-clr)) | |
| ;; | |
| (doto | |
| (xy-plot n | |
| clj-java-1-5-0-RC2 | |
| :title "Throughput by Volume" | |
| :x-label "number of lines" | |
| :y-label "runtime per line (ms)" | |
| :legend true) | |
| (add-lines n clj-java-1-5-1) | |
| (add-lines n clj-clr-1-4-1) | |
| view) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment