-
Notifications
You must be signed in to change notification settings - Fork 0
/
quickbench.1
141 lines (138 loc) · 3.49 KB
/
quickbench.1
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
.\" Automatically generated by Pandoc 1.17.1
.\"
.TH "quickbench" "1" "Oct 2016" "quickbench 1.0" ""
.hy
.SH NAME
.PP
quickbench \- quick & easy benchmarking of command\-line programs
.SH SYNOPSIS
.PP
\f[C]quickbench\ [options]\ [<cmd>...]\f[]
.SH DESCRIPTION
.PP
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\[aq] first words are replaced with a new executable
(or multiple comma\-separated executables, showing times for all).
.SH OPTIONS
.TP
.B \f[C]\-f,\ \-\-file\ CMDSFILE\f[]
file containing commands, one per line (\- for stdin)
.RS
.RE
.TP
.B \f[C]\-w,\ \-\-with\ EXE[,...]\f[]
replace first word of commands with these executables
.RS
.RE
.TP
.B \f[C]\-n,\ \-\-iterations=N\f[]
run each test this many times [default: 1]
.RS
.RE
.TP
.B \f[C]\-N,\ \-\-cycles=N\f[]
run the whole suite this many times [default: 1]
.RS
.RE
.TP
.B \f[C]\-p,\ \-\-precision=N\f[]
show times with this many decimal places [default: 2]
.RS
.RE
.TP
.B \f[C]\-v,\ \-\-verbose\f[]
show commands being run
.RS
.RE
.TP
.B \f[C]\-V,\ \-\-more\-verbose\f[]
show command output
.RS
.RE
.TP
.B \f[C]\-\-debug\f[]
show debug output for this program
.RS
.RE
.TP
.B \f[C]\-h,\ \-\-help\f[]
show this help
.RS
.RE
.SH EXAMPLES
.IP
.nf
\f[C]
$\ 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\ |
+\-\-\-\-\-\-\-\-\-++\-\-\-\-\-\-+
\f[]
.fi
.IP
.nf
\f[C]
$\ 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\ |
+\-\-\-\-\-\-\-\-\-\-\-\-\-++\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+
\f[]
.fi
.SH FILES
.PP
quickbench looks for tests in \f[C]\&./bench.sh\f[] if no command
arguments or \f[C]\-\-file\f[] option are provided.
.SH LIMITATIONS
.PP
quickbench tests executable files on disk only, not shell builtins or
aliases.
.PP
Options must precede arguments on the command line.
.PP
\f[C]\-V\f[] will become \f[C]\-vv\f[] when implementing that becomes
easier.
.SH BUG REPORTS
.PP
https://github.com/simonmichael/quickbench/issues
.SH SEE ALSO
.PP
Home page: https://github.com/simonmichael/quickbench
.PP
bench(1): https://github.com/Gabriel439/bench
.PP
time(1)
.SH COPYRIGHT
.PP
Copyright (C) 2008\-2016 Simon Michael.
Released under GNU GPL v3+
.SH AUTHORS
Simon Michael <[email protected]>.