Commit Graph
427 Commits
Author SHA1 Message Date
David Peter 13986b17f4 Move progress bar to separate module 2021-08-24 22:44:08 +02:00
David Peter 8618c86421 Fix float eq check 2021-08-24 22:44:08 +02:00
David Peter 9d61130b44 Remove timer/internal.rs 2021-08-24 22:44:08 +02:00
David Peter 60e9771ad5 Remove cfg-if dependency 2021-08-24 22:44:08 +02:00
David Peter 9df6174bc2 Re-order imports 2021-08-24 22:44:08 +02:00
David Peter 30c381fe2a Flat directory/module structure 2021-08-24 22:44:08 +02:00
David Peter 9b328ff354 Move BenchmarkResult to new file 2021-08-23 21:47:58 +02:00
David Peter cbfd9f5b41 Move DEFAULT_SHELL to options 2021-08-23 21:47:58 +02:00
David Peter 465160b9aa Move Options struct to new module 2021-08-23 21:47:58 +02:00
David Peter eee32308b7 Move Command struct to new module 2021-08-23 21:47:58 +02:00
David Peter 068bebb4e6 Fix remaining clippy warnings 2021-08-22 16:33:43 +02:00
David Peter 85730b3f0f Auto-fix clippy warnings 2021-08-22 16:33:43 +02:00
David Peter f860c3cf6b Run cargo fmt 2021-08-22 15:51:28 +02:00
David Peter b2ea743adf Reduce shell-startup-time measurements to 50
closes #378
2021-07-27 22:45:26 +02:00
Steven Gu 28e8c315dc Merges new and validate methods of RangeStep into one method, renames error names according to code review. 2021-07-27 22:34:38 +02:00
Steven Gu d4a0e9afb6 Fixes to limit --command-name count appear exactly once or same count with parameters. 2021-07-27 22:34:38 +02:00
Steven Gu 538dd06c16 Makes --comand-name take arguments from --parameter-list. 2021-07-27 22:34:38 +02:00
David Peter de59bb5ff1 Fix clippy errors 2021-07-27 09:26:49 +02:00
Garrett Thornburg 297dddb70e Require user and system time units to match report time unit
The stddev/mean/max/min time unit gives precedence to the `--time-unit`
command line flag and falls back to parsing. This changes the user and
system time to follow the same time unit as the rest of the report.

Closes #408
2021-07-26 21:08:49 +02:00
Rémi Lauzier 5223afc4f1 Revert some change for i686 build 2021-06-14 16:32:58 +02:00
Rémi Lauzier aa162cd886 Fix some clippy warning 2021-06-14 16:32:58 +02:00
Jordi Chauzi 7e23087b89 Avoid confusion between exit code and signal values 2021-05-10 14:55:04 +02:00
Jordi Chauzi 5564407a97 Store exit codes as Options (and remove unwrapping) 2021-05-10 14:55:04 +02:00
Jordi Chauzi 3fcc6a187b Export exit codes to JSON output 2021-05-10 14:55:04 +02:00
David Peter 9e57bf613c Bump indicativ to 0.16 2021-05-09 14:46:37 +02:00
Nir Soffer 5348ab9ba3 benchmark.rs: Don't use # in benchmark name
Using `Benchmark #1` causes github and gitlab to interrupt hyperfine
results as link to issue #1. Remove the # from the benchmark number to
play better with these systems.

Fixes #381.
2021-05-07 10:12:10 +02:00
n4to4 db45181c88 Fix comment 2021-04-23 12:08:56 +02:00
Julian Kaindl c05d7f9480 Add command exit code to output if it fails 2020-10-25 19:04:17 +01:00
Martin Junghanns 990ed45c3a Create export file before first benchmark (#340) 2020-10-18 09:15:44 +02:00
Martin Junghanns d7e6fa6dfb Export intermediate results after each benchmark command 2020-10-18 09:13:56 +02:00
sharkdp 4fa16852cf Update help text 2020-10-17 00:07:06 +02:00
sharkdp 46ad9bf39a Show error if numeric arguments can not be parsed
Shows an error message if the argument to options like '--warmup <N>'
can not be parsed:

    > hyperfine --warmup xxx "sleep 1"
    Error: Could not read numeric argument to '--warmup': invalid digit found in string

closes #337
2020-10-16 23:55:14 +02:00
sharkdp b2a246c195 Fix nan/inf output for very fast commands
closes #319
2020-10-16 11:00:49 +02:00
sharkdp 1477c68658 Add MAD=0 unit tests for outlier detection, see #329 2020-10-15 22:45:36 +02:00
Stéphane Campinas 25f8129212 return an error if there are more name options than commands 2020-10-15 22:42:44 +02:00
Stéphane Campinas 71a47c0566 use --command-name for the long option 2020-10-15 22:42:44 +02:00
Stéphane Campinas d548643561 add comment to HyperfineOptions#names field 2020-10-15 22:42:44 +02:00
Stéphane Campinas 0f0a109ca0 add CLI option to identify a command with a custom name
CLI option `--name` can be used to define the name to identify a
command. If not passed, then the command itself is used. Commands
and names are paired in the same order: The first command executed gets
the first name passed as option.

Close #326
2020-10-15 22:42:44 +02:00
sharkdp 674b5422ab Fix outlier detection for "fast outliers"
closes #329
2020-10-15 22:37:54 +02:00
sharkdp daf5ced498 Keep output colorized for 'full' and 'color' style
fixes #332
2020-10-15 21:54:57 +02:00
William Chargin 89737785f8 [update patch]
wchargin-branch: param-list-matrix
wchargin-source: f866f0df2eae5f4bac2022c0db48edb0e8e6361e
2020-10-13 14:00:46 +02:00
William Chargin f6464a2943 Support matrices of independent parameter lists
This patch permits the `-L`/`--parameter-list` argument to appear
multiple times. Each additional parameter increases the dimensionality
of the parameter matrix. One benchmark will be run for each combination
of parameters (i.e., the benchmark space is the Cartesian product of the
parameter spaces).

For now, `--parameter-list` and `--parameter-scan` are still mutually
exclusive. If desired, a follow-up change could similarly permit
multiple occurrences of `--parameter-scan` and also permit use of both
listed and scanned parameters together. (After all, `--parameter-scan`
can be thought of as syntactic sugar for a parameter list.)

This implementation is a little profligate with memory usage for
`BenchmarkResult`s: each result contains a separate copy of all
parameter names (as `String`s). This could be done away with by
threading lifetimes through the `BenchmarkResult`s, or by ref-counting
the names.

Because `BenchmarkResult`s now have maps with arbitrary key sets, we can
no longer use `serde` to serialize them to CSV. But a CSV writer is easy
to write by hand, so we just do that.

Fixes #253.

Test Plan:
Some unit tests included. As an integration test, try:

```
cargo run --release -- --runs 10 \
    -L foo foo1,foo2 -L bar bar9,bar8 \
    'echo {foo} {bar}' \
    'printf "%s\n" {foo} {bar}' \
    --export-csv /tmp/out
```

with all the export formats.

wchargin-branch: param-list-matrix
wchargin-source: 11051ab222c9de0fbc6ac6a080fbca48e05996c2
2020-10-13 14:00:46 +02:00
sharkdp 46e7e4152a Initial support for randomized environment variables 2020-05-25 16:03:58 +02:00
Alain Martin d5e20cc760 Fix case of "AsciiDoc"
This matches how it is written on the README.
2020-05-22 22:43:49 +02:00
Alain Martin b97ecf01c2 Fix typo seperated -> separated 2020-05-22 22:43:49 +02:00
sharkdp 559e387ffa Use ASCII spinner for Windows
closes #229
2020-01-04 11:42:11 +01:00
sharkdp 8b0dd37962 Fix warning on Windows 2020-01-04 11:12:49 +01:00
Andrii Radyk 9a064b7a8f remove deprecated Error::description 2019-12-19 21:55:16 +01:00
sharkdp 954b62003f Change behavior for empty input 2019-10-20 13:45:41 +02:00
sharkdp 3e217f4233 Add simple tokenizer for parameter list 2019-10-20 13:45:41 +02:00