on master help sign in
sort on index 0 if column index 1 is not available
commitbdd8a4df50f5c219c160856408fdaaa7c96b25e3 authorHarendra Kumar <harendra.kumar@gmail.com> dateWed 10 Oct 2018, 11:36 (8 years ago) parenta929a16
3 files changed+13−15
bench.sh+4−6 benchmark/Chart.hs+6−2 stack.yaml+3−7
bench.sh+4−6
@@ -10,12 +10,10 @@ print_help () {
1010 echo " [--append] "
1111 echo " -- <gauge options>"
1212 echo
13− # XXX in the report the base and candidate are shown in reverse order as we
14− # run the benchmarks for candidate first and then base.
15− #echo "When using --compare, by default comparative chart of HEAD^ vs HEAD"
16− #echo "commit is generated, in the 'charts' directory."
17− #echo "Use --base and --candidate to select the commits to compare."
18− #echo
13+ echo "When using --compare, by default comparative chart of HEAD^ vs HEAD"
14+ echo "commit is generated, in the 'charts' directory."
15+ echo "Use --base and --candidate to select the commits to compare."
16+ echo
1917 echo "Any arguments after a '--' are passed directly to guage"
2018 echo "You can omit '--' if the gauge args used do not start with a '-'."
2119 exit
benchmark/Chart.hs+6−2
@@ -158,8 +158,12 @@ benchShow Options{..} cfg func inp out =
158158 ignoringErr $ report inp Nothing $ cfg
159159 { selectBenchmarks =
160160 \f ->
161− reverse $ map fst $
162− sortBy (comparing snd) $ f $ ColumnIndex 1
161+ reverse
162+ $ map fst
163+ $ either
164+ (const $ either error id $ f $ ColumnIndex 0)
165+ (sortBy (comparing snd))
166+ $ f $ ColumnIndex 1
163167 }
164168
165169main :: IO ()
stack.yaml+3−7
@@ -5,17 +5,13 @@ allow-newer: true
55extra-deps:
66 - SDL-0.6.6.0
77 - gauge-0.2.3
8− #- bench-graph-0.1.4
98 - Chart-1.9
109 - Chart-diagrams-1.9
1110 - SVGFonts-1.6.0.3
12− - math-functions-0.3.0.2
11+
12+ #- bench-graph-0.1.4
1313 - git: https://github.com/composewell/bench-graph
14− commit: 27ea72037f01e252364197e4771e25478af97972
15− - git: https://github.com/harendra-kumar/statistics
16− commit: d3c4743c28fdd83d578039867f1a046596f77140
17− subdirs:
18− - dense-linear-algebra
14+ commit: 40bcf995a1bb02dbce40117db3b73555b3921f35
1915
2016flags: {}
2117extra-package-dbs: []