Skip to content

Commit ec55f98

Browse files
committed
readme, man page, changelog updates
1 parent b49b75e commit ec55f98

File tree

3 files changed

+57
-14
lines changed

3 files changed

+57
-14
lines changed

CHANGES

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ quickbench changes:
88

99
- more robust command execution, signal handling, output, error reporting
1010

11-
- switch to docopt; options must precede args for now
11+
- switch to docopt, options must precede args for now
1212

1313
- new UI: full commands are specified by arguments/file/stdin,
1414
alternate executables can be specified with -w, flags cleanup
@@ -17,3 +17,4 @@ quickbench changes:
1717

1818
- -N/--cycles repeats the whole test suite
1919

20+
- man page

README.md

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
1-
# quickbench
1+
# quickbench 1.0
22

33
Quick & easy benchmarking of command-line programs.
44

5+
[About](#about)
6+
| [Examples](#examples)
7+
| [Usage](#usage)
8+
| [Related](#related-work)
9+
10+
511
## About
612

7-
This is a reboot of the simplebench benchmarking tool from the hledger
8-
project. You can use it as a fancier "time" command for benchmarking
9-
command-line programs, or as a haskell library (eg in package benchmark
10-
suites).
13+
quickbench is an update and repackaging of a benchmarking tool I've been
14+
using in the hledger project since 2008.
15+
Use it like a more powerful "time" command for benchmarking general command-line programs,
16+
or for creating repeatable benchmark scripts for your projects.
1117

12-
quickbench is not smart or complicated like "bench" or criterion; it is
13-
good for quick and dirty, exploratory, comparative measurements
14-
that you can run quickly and understand at a glance.
15-
I find it very useful; patches welcome!
18+
quickbench produces very simple output (elapsed seconds),
19+
as quickly as possible (running commands just once by default),
20+
and tabulates results from multiple executables.
21+
I find it very useful for quick and dirty, exploratory, and comparative measurements
22+
that I (and others) can understand at a glance.
1623

1724
## Examples
1825

26+
Install it easily on most platforms with [stack](https://haskell-lang.org/get-started) (or cabal).
27+
It's not yet on Hackage, so you'll need the source:
28+
1929
```bash
2030
$ git clone https://github.com/simonmichael/quickbench.git
2131
$ cd quickbench
@@ -35,7 +45,8 @@ Best times:
3545
+---------++------+
3646
```
3747

38-
or in a file.. `bench.sh` will be used by default:
48+
or put them in a file and use `-f FILE`.
49+
A file named `bench.sh` in the current directory will be used automatically:
3950
```
4051
$ echo 'echo 3 * 1000000' > bench.sh
4152
$ quickbench
@@ -62,7 +73,8 @@ Best times:
6273
+-------------++---------+---------+
6374
```
6475

65-
and repeat tests to reduce and evaluate jitter:
76+
and run tests repeatedly to reduce or observe jitter.
77+
(quickbench assumes the quickest measurement is the truest one):
6678
```
6779
$ quickbench -w echo,expr -p5 -n100 -N2
6880
Running 1 tests 100 times with 2 executables at 2016-10-16 23:57:34.387764 UTC:
@@ -155,3 +167,25 @@ Options:
155167
-h, --help show this help
156168
```
157169

170+
## Related
171+
172+
[bench](https://github.com/Gabriel439/bench#readme) (Gabriel Gonzalez 2016) is another
173+
command line benchmarking tool written in Haskell.
174+
Use that one if you need detailed statistical analysis and output, or HTML reports.
175+
Here is bench's output for the echo/expr example above:
176+
```
177+
$ bench 'echo 3 * 1000000'; bench 'expr 3 \* 1000000'
178+
benchmarking echo 3 * 1000000
179+
time 2.215 ms (2.173 ms .. 2.250 ms)
180+
0.995 R² (0.989 R² .. 0.998 R²)
181+
mean 2.238 ms (2.203 ms .. 2.296 ms)
182+
std dev 147.6 μs (92.84 μs .. 265.3 μs)
183+
variance introduced by outliers: 48% (moderately inflated)
184+
185+
benchmarking expr 3 \* 1000000
186+
time 3.484 ms (3.405 ms .. 3.556 ms)
187+
0.994 R² (0.987 R² .. 0.998 R²)
188+
mean 3.564 ms (3.497 ms .. 3.684 ms)
189+
std dev 280.3 μs (178.0 μs .. 494.9 μs)
190+
variance introduced by outliers: 52% (severely inflated)
191+
```

quickbench.1.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@ quickbench - quick & easy benchmarking of command-line programs
1212

1313
# DESCRIPTION
1414

15-
Runs some test commands, possibly with different executables, once or more
16-
and shows their best execution times in tabular format.
15+
quickbench runs some test commands, possibly with different executables,
16+
once or more and shows their best execution times in tabular format.
17+
18+
It produces very simple output (elapsed seconds),
19+
as quickly as possible (running commands just once by default),
20+
and tabulates results from multiple executables.
21+
I find it useful for quick and dirty, exploratory, and comparative
22+
measurements that you (and others) can understand at a glance.
1723

1824
Commands are specified as one or more quote-enclosed arguments,
1925
and/or one per line in CMDSFILE; or read from a default file [./bench.sh].
@@ -106,6 +112,8 @@ Home: https://github.com/simonmichael/quickbench
106112

107113
bench(1): https://github.com/Gabriel439/bench
108114

115+
time(1)
116+
109117
# COPYRIGHT
110118

111119
Copyright (C) 2008-2016 Simon Michael.

0 commit comments

Comments
 (0)