Commit Graph
354 Commits
Author SHA1 Message Date
Sendhil Panchadsaram 8c2ef10633 Fix typo in unit test.
src/command.rs: test_parameterr_scan_commands_names -> test_parameter_scan_commands_names
2022-10-06 16:09:11 +02:00
David Peter 71c139c81e Updates for indicatif 0.17 2022-09-23 08:34:10 +02:00
David Peter c7e56942f7 Fix clippy suggestions 2022-09-07 09:20:50 +02:00
David Peter dffbdc34d4 Add new (hidden) --min-benchmarking-time option 2022-09-07 09:13:53 +02:00
David Peter c4f7bbbd2b Merge branch '1' 2022-09-07 08:47:26 +02:00
David Peter 9fefe9af31 Rewrite boolean condition 2022-09-07 08:44:57 +02:00
Clemens Wasser 7db6178dfa Cleanup Windows CPUTimer 2022-09-07 08:32:30 +02:00
наб 049d1138c9 Don't output colours by default if TERM=dumb or NO_COLOR=1
This matches ZFS, and is mostly état d'art

Closes #542
2022-09-02 13:38:37 +02:00
Clemens Wasser ac8c114c80 Fix user and kernel times on Windows 2022-09-02 08:48:50 +02:00
cactter 2e8ce30235 Shrink unsafe block 2022-08-02 09:28:08 +02:00
David Peter de0ace4c7d Add full stop after help messages 2022-07-01 13:57:42 +02:00
Engineer-of-Efficiency d08c393c40 Add spaces and shorten prompt 2022-07-01 13:57:01 +02:00
Engineer-of-Efficiency 4357559a56 Remove single space character 2022-07-01 13:57:01 +02:00
Engineer-of-Efficiency 2045e97b1d Correct default of the --time-unit option in help text 2022-07-01 13:57:01 +02:00
Engineer-of-Efficiency a217f3f32a Remove possible ambiguity
Remove possible ambiguity concerning the --time-unit option.
2022-07-01 13:57:01 +02:00
Engineer-of-Efficiency edb29f4e4e Make --time-unit help text more generic. 2022-07-01 13:57:01 +02:00
Engineer-of-Efficiency 73f1e14390 Add hints to all export options 2022-07-01 13:57:01 +02:00
Engineer-of-Efficiency 30d2253351 Add hint to --time-unit 2022-07-01 13:57:01 +02:00
Philipp Paulweber 5e655032bc Refactor AsciiDocExporter emitting using the MarkupExporter trait 2022-05-26 22:38:25 +02:00
David Peter ec4321392f Fix clippy warnings 2022-05-17 22:57:10 +02:00
Tavian Barnes 3df63ba2bb Address review comments 2022-05-17 22:30:45 +02:00
Tavian Barnes efdf735723 Forbid --output=file without a path separator 2022-05-17 22:30:45 +02:00
Tavian Barnes ecee9df575 Add --output=inherit as an alias for --show-output 2022-05-17 22:30:45 +02:00
Tavian Barnes dfd1046d63 Clarify --output's help text 2022-05-17 22:30:45 +02:00
Tavian Barnes 277807cb5a Implement --output={null,pipe,<FILE>}
Fixes #377.
2022-05-17 22:30:45 +02:00
David Peter eb0ccc85f1 Adapt to new markup exporter changes 2022-05-15 21:57:35 +02:00
Philipp Paulweber 2443383fc8 Export of Emacs org-mode table support
* added new command-line option '--export-orgmode <FILE>' to create
  Emacs org-mode table output by reusing markup result formatting
* based on the new MarkdownFormatter trait, see PR #490
2022-05-15 21:57:35 +02:00
David Peter e3bc5b8b25 Simplify test 2022-05-15 21:37:40 +02:00
David Peter 8c05fd030d table_line => table_divider 2022-05-15 21:37:40 +02:00
David Peter 5cd2821266 table_data => table_row 2022-05-15 21:37:40 +02:00
David Peter 7fdb32d202 Remove superfluous newline 2022-05-15 21:37:40 +02:00
David Peter 339f6661ce Move determine_unit_from_results 2022-05-15 21:37:40 +02:00
David Peter 4cdf2d5152 Implement Exporter for all MarkupExporters 2022-05-15 21:37:40 +02:00
David Peter 9a46bcc390 Remove the TestExporter 2022-05-15 21:37:40 +02:00
David Peter 6fe7738165 Do not pass 'unit' into determine_unit_from_results 2022-05-15 21:37:40 +02:00
David Peter 8741d05d11 Move Exporter::unit => determine_unit_from_results 2022-05-15 21:37:40 +02:00
Philipp Paulweber 69d38a5f8e Refactor MarkupExporter to omit intermediate table result creation and simplify MarkupFormatter emitting
* see: https://github.com/sharkdp/hyperfine/pull/490#pullrequestreview-932424652
2022-05-15 21:37:40 +02:00
Philipp Paulweber 9dc87ac349 Refactor MarkdownExporter emitting using a generic MarkupFormatter trait
* see: https://github.com/sharkdp/hyperfine/pull/490#issuecomment-1076784074
2022-05-15 21:37:40 +02:00
Philipp Paulweber 50cf7de915 Refactor Markdown table emitting to generic Markup function 2022-05-15 21:37:40 +02:00
Philipp Paulweber 3b1fc32626 Refactor Markdown table contents generation to generic Markup function 2022-05-15 21:37:40 +02:00
Philipp Paulweber 23d9fe2595 Refactor Markdown with Markup by using generic table emitter 2022-05-15 21:37:40 +02:00
David Peter 65932dd5ce Update warning text 2022-03-05 12:47:30 +01:00
David Peter 365ff2584d Switch to --shell=none/-N, do not change the default 2022-02-22 22:51:09 +01:00
David Peter d9418e0731 Use raw executor by default, skip intermediate shell
This adds a new "raw executor" (next to the "shell executor") that
allows hyperfine to execute commands directly without any intermediate
shell.

The command line is split into tokens (using the `shell-words` crate),
and according to POSIX rules. The first token is taken as the executable,
and the rest as arguments.

The new executor is enabled by default. In order to select the shell
executor, users will have to pass `--shell=default`.

This allows us to reduce measurement noise and to benchmark very quick
commands. It also decreases the time to run benchmarks, as we don't need
the calibration phase.

Also, it allows one to make sure that the executed command is not
implemented as a shell builtin. For example `hyperfine true`
and `hyperfine --shell=default true` return different times due
to the fact that `bash` executes `true` as a NOP.

Co-authored: Ciprian Dorin Craciun <ciprian@volution.ro>
2022-02-22 22:51:09 +01:00
David Peter f2f1dd9d40 Update dependencies 2022-02-22 14:04:07 +01:00
David Peter 308bf5cd26 Extract common functionality 2022-02-22 13:24:05 +01:00
David Peter f19223ba9d Simplify 2022-02-22 13:24:05 +01:00
David Peter 7fd4aea495 Rename to TimerResult 2022-02-22 13:24:05 +01:00
David Peter 55f0ef6637 Move wall clock timer into execute_and_measure 2022-02-22 13:24:05 +01:00
David Peter e001530f61 Change argument order 2022-02-22 13:24:05 +01:00