@@ -66,19 +66,17 @@ $ cabal bench streamly-benchmarks
67## Building and Running Benchmarks with bench.sh
67## Building and Running Benchmarks with bench.sh
69−`bench.sh` script at the root of the repo is the top level driver for running
69+`<streamly repo>/bin/bench.sh` script is the top level driver for
70−benchmarks. It runs the requested benchmarks and then creates a report from the
70+running benchmarks. It runs the requested benchmarks and then creates a
71−results using the `bench-show` package. Try `bench.sh --help` for available
71+report from the results using the `bench-show` package. Try `bench.sh
72−options to run it.
72+--help` for available options to run it.
74## bench.sh: Quick start
74## bench.sh: Quick start
76−You must be in the repo root directory to run these commands.
78Run the default benchmark suites:
76Run the default benchmark suites:
81−$ ./bench.sh --quick
79+$ bench.sh --quick
84You can remove the `--quick` option to run benchmark with lower speed but
82You can remove the `--quick` option to run benchmark with lower speed but
@@ -88,25 +86,25 @@ the accuracy a bit.
88Show available benchmark suites:
86Show available benchmark suites:
91−$ ./bench.sh --benchmarks help
89+$ bench.sh --benchmarks help
94Run all benchmark suites in the `serial_grp` group:
92Run all benchmark suites in the `serial_grp` group:
97−$ ./bench.sh --benchmarks serial_grp
95+$ bench.sh --benchmarks serial_grp
100Run `Prelude.Serial` and `Data.Parser` benchmark suites:
98Run `Prelude.Serial` and `Data.Parser` benchmark suites:
103−$ ./bench.sh --benchmarks "Prelude.Serial Data.Parser"
101+$ bench.sh --benchmarks "Prelude.Serial Data.Parser"
106Run all O(1) space complexity benchmarks in `Prelude.Serial` suite:
104Run all O(1) space complexity benchmarks in `Prelude.Serial` suite:
109−$ ./bench.sh --benchmarks Prelude.Serial -- Prelude.Serial/o-1-space
107+$ bench.sh --benchmarks Prelude.Serial -- Prelude.Serial/o-1-space
112Anything after a `--` is passed to the benchmark executable,
110Anything after a `--` is passed to the benchmark executable,
@@ -116,7 +114,7 @@ it basically selects all benchmarks starting with
116Run a specific benchmark in `Prelude.Serial` suite:
114Run a specific benchmark in `Prelude.Serial` suite:
119−$ ./bench.sh --benchmarks Prelude.Serial -- Prelude.Serial/o-1-space/generation/unfoldr
117+$ bench.sh --benchmarks Prelude.Serial -- Prelude.Serial/o-1-space/generation/unfoldr
122Run a benchmark directly instead of running it through `bench.sh`:
120Run a benchmark directly instead of running it through `bench.sh`:
@@ -136,14 +134,14 @@ To compare two sets of results, first run the benchmarks at the baseline
139−$ ./bench.sh
137+$ bench.sh
142And then run with the `--append` option at the commit that you want to compare
140And then run with the `--append` option at the commit that you want to compare
143with the baseline. It will show the comparison with the baseline:
141with the baseline. It will show the comparison with the baseline:
146−$ ./bench.sh --append
144+$ bench.sh --append
149Append just adds the next set of results in the same results file. You can keep
147Append just adds the next set of results in the same results file. You can keep
@@ -157,19 +155,19 @@ while.
157You can use `--compare` to compare the previous commit with the head commit:
155You can use `--compare` to compare the previous commit with the head commit:
160−$ ./bench.sh --compare
158+$ bench.sh --compare
163To compare the head commit with some other base commit:
161To compare the head commit with some other base commit:
166−$ ./bench.sh --compare --base d918833
164+$ bench.sh --compare --base d918833
169To compare two arbitrary commits:
167To compare two arbitrary commits:
172−$ ./bench.sh --compare --base d918833 --candidate 38aa5f2
170+$ bench.sh --compare --base d918833 --candidate 38aa5f2
175Note that the above may not always work because the script and the benchmarks
173Note that the above may not always work because the script and the benchmarks
@@ -181,7 +179,7 @@ reliable to compare.
181First see the available benchmark suites:
179First see the available benchmark suites:
184−$ ./bench.sh --benchmarks help
182+$ bench.sh --benchmarks help
187You will see some benchmark suites end with `_cmp`, these are comparison
185You will see some benchmark suites end with `_cmp`, these are comparison
@@ -190,7 +188,7 @@ benchmark suites in that group will be shown in the end. For example to compare
190all array benchmark suites:
188all array benchmark suites:
193−$ ./bench.sh --benchmarks array_cmp
191+$ bench.sh --benchmarks array_cmp
196## Reporting without measuring
194## Reporting without measuring