Skip to content

Commit

Permalink
Add -l option to enable showing platform column in table
Browse files Browse the repository at this point in the history
  • Loading branch information
jafingerhut committed Oct 24, 2012
1 parent 66e91b3 commit d78592d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bin/results2graphs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ consisting of one or more Measurement elements\n"
;;(def options-spec
;; [ ["-t" "--show-table" "Show table of results"]
;; ["-a" "--show-all-times" "In table, show all run times"]
;; ["-l" "--show-platform" "In table, show platform"]
;; ["-p" "--[no]-plots" :default true] ])


Expand All @@ -186,6 +187,8 @@ consisting of one or more Measurement elements\n"
problem/platform/language combo, but also a list of all elapsed
times sorted in increasing order.

-l Like -a, except adds a 'platform' column to the table.

-p By default, use gnuplot to generate PNG format plots for each
problem. With this option, skip the generation of plots.
" prog-name options-desc))
Expand All @@ -195,11 +198,13 @@ consisting of one or more Measurement elements\n"
(loop [args args
opts {:show-table false
:show-all-times false
:show-platform false
:plots true}]
(if-let [arg (first args)]
(if-let [opt (case arg
"-t" {:show-table true}
"-a" {:show-all-times true}
"-l" {:show-platform true}
"-p" {:plots false}
nil)]
(recur (rest args) (merge opts opt))
Expand Down Expand Up @@ -240,8 +245,11 @@ consisting of one or more Measurement elements\n"

;; debug output
(when (:show-table opts)
(let [columns (concat [:problem :platform :language :elapsed_time_sec
:time_var]
(let [columns (concat [:problem]
(if (:show-platform opts)
[:platform]
[])
[:language :elapsed_time_sec :time_var]
(if (:show-all-times opts)
[:other_elapsed_time_sec]
[])
Expand Down

0 comments on commit d78592d

Please sign in to comment.