packages feed

quickbench-1.0: quickbench.1

.\" 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 <simon@joyful.com>.