-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathquickbench.1
More file actions
110 lines (107 loc) · 3.19 KB
/
quickbench.1
File metadata and controls
110 lines (107 loc) · 3.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
.\" Automatically generated by Pandoc 3.6.4
.\"
.TH "quickbench" "1" "Apr 2025" "quickbench 1.1"
.SH NAME
quickbench \- quick & easy benchmarking of command\-line programs
.SH SYNOPSIS
\f[CR]quickbench [options] [CMD...]\f[R]
.SH DESCRIPTION
quickbench runs some test commands, possibly with different executables,
once or more and shows their best execution times in tabular format.
.PP
It produces very simple output (elapsed seconds), as quickly as possible
(running commands just once by default), and tabulates results from
multiple executables.
I find it useful for quick and dirty, exploratory, and comparative
.PD 0
.P
.PD
measurements that you (and others) can understand at a glance.
.PP
Commands are specified as one or more quote\-enclosed arguments, and/or
one per line in CMDSFILE; or read from a default file [./bench.sh].
.PP
With \-w, commands\[cq] first words are replaced with a new executable
(or multiple comma\-separated executables, showing times for all).
.SH OPTIONS
.TP
\f[CR]\-f, \-\-file CMDSFILE\f[R]
file containing commands, one per line (\- for stdin)
.TP
\f[CR]\-w, \-\-with EXE[,...]\f[R]
replace first word of commands with these executables
.TP
\f[CR]\-n, \-\-iterations=N\f[R]
run each test this many times [default: 1]
.TP
\f[CR]\-N, \-\-cycles=N\f[R]
run the whole suite this many times [default: 1]
.TP
\f[CR]\-p, \-\-precision=N\f[R]
show times with this many decimal places [default: 2]
.TP
\f[CR]\-v, \-\-verbose\f[R]
show commands being run
.TP
\f[CR]\-V, \-\-more\-verbose\f[R]
show command output
.TP
\f[CR]\-\-debug\f[R]
show debug output for this program
.TP
\f[CR]\-h, \-\-help\f[R]
show this help
.SH EXAMPLES
.IP
.EX
$ quickbench \[aq]sleep 1\[aq]
Running 1 tests 1 times at 2016\-10\-16 23:06:48.058578 UTC:
Best times:
+\-\-\-\-\-\-\-\-\-++\-\-\-\-\-\-+
| || |
+=========++======+
| sleep 1 || 1.01 |
+\-\-\-\-\-\-\-\-\-++\-\-\-\-\-\-+
.EE
.IP
.EX
$ echo \[aq]echo 3 * 1000000\[aq] > bench.sh
$ quickbench \-w echo,expr \-p5 \-n100 \-N2
Running 1 tests 100 times with 2 executables at 2016\-10\-16 23:57:34.387764 UTC:
Best times 1:
+\-\-\-\-\-\-\-\-\-\-\-\-\-++\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+
| || echo | expr |
+=============++=========+=========+
| 3 * 1000000 || 0.00112 | 0.00135 |
+\-\-\-\-\-\-\-\-\-\-\-\-\-++\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+
Best times 2:
+\-\-\-\-\-\-\-\-\-\-\-\-\-++\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+
| || echo | expr |
+=============++=========+=========+
| 3 * 1000000 || 0.00111 | 0.00136 |
+\-\-\-\-\-\-\-\-\-\-\-\-\-++\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+
.EE
.SH FILES
quickbench looks for tests in \f[CR]./bench.sh\f[R] if no command
arguments or \f[CR]\-\-file\f[R] option are provided.
.SH LIMITATIONS
quickbench tests executable files on disk only, not shell builtins or
aliases.
.PP
Options must precede arguments on the command line.
.PP
\f[CR]\-V\f[R] will become \f[CR]\-vv\f[R] when implementing that
becomes easier.
.SH BUG REPORTS
https://github.com/simonmichael/quickbench/issues
.SH SEE ALSO
Home page: https://github.com/simonmichael/quickbench
.PP
time(1)
.SH COPYRIGHT
Copyright (C) 2008\-2025 Simon Michael.
Released under GNU GPL v3+
.SH AUTHORS
Simon Michael \c
.MT simon@joyful.com
.ME \c.