22
33Quick & easy benchmarking of command-line programs.
44
5+ ## About
6+
57This is a reboot of the simplebench benchmarking tool from the hledger
68project. You can use it as a fancier "time" command for benchmarking
79command-line programs, or as a haskell library (eg in package benchmark
@@ -12,6 +14,8 @@ good for quick and dirty, exploratory, comparative measurements
1214that you can run quickly and understand at a glance.
1315I find it very useful; patches welcome!
1416
17+ ## Examples
18+
1519``` bash
1620$ git clone https://github.com/simonmichael/quickbench.git
1721$ cd quickbench
@@ -32,7 +36,7 @@ Best times:
3236```
3337
3438or in a file.. ` bench.sh ` will be used by default:
35- ``` bash
39+ ```
3640$ echo 'echo 3 * 1000000' > bench.sh
3741$ quickbench
3842Running 1 tests 1 times at 2016-10-16 23:53:04.743899 UTC:
@@ -46,7 +50,7 @@ Best times:
4650```
4751
4852You can compare results with different executables:
49- ``` bash
53+ ```
5054$ quickbench -w echo,expr -p5
5155Running 1 tests 1 times with 2 executables at 2016-10-16 23:56:40.808703 UTC:
5256
@@ -59,7 +63,7 @@ Best times:
5963```
6064
6165and repeat tests to reduce and evaluate jitter:
62- ``` bash
66+ ```
6367$ quickbench -w echo,expr -p5 -n100 -N2
6468Running 1 tests 100 times with 2 executables at 2016-10-16 23:57:34.387764 UTC:
6569
@@ -79,7 +83,7 @@ Best times 2:
7983```
8084
8185You can turn a shell script into a benchmark suite by adding a shebang line:
82- ``` bash
86+ ```
8387$ cat 410-run-time.sh
8488#!/usr/bin/env quickbench -v -p2 -n2 -w hledger-410-before,hledger-410-8bde75c -f
8589hledger -f 10000x1000x10.journal print
@@ -123,8 +127,9 @@ Best times:
123127+-----------------------------------++--------------------+---------------------+
124128```
125129
126- Usage:
127- ``` bash
130+ ## Usage
131+
132+ ```
128133$ quickbench -h
129134quickbench 1.0
130135Run some test commands, possibly with different executables, once or more
0 commit comments