Commit Graph
35 Commits
Author SHA1 Message Date
David Peter 7167df6951 Fix relative runtime ratios with an explicit reference 2026-10-05 14:20:04 +02:00
David Peter 8cf4e010e9 Truncate export files before rewriting results 2026-10-05 12:48:52 +02:00
David Peter aa14b8c0d9 Group units, formatting, and statistics under quantity 2026-10-05 10:46:51 +02:00
c0b3834277 Handle broken pipe errors on stdout gracefully (#932)
Replace `println!` calls on the results paths with `writeln!` on
`io::stdout()` and propagate the `io::Error` to `main`, where
`ErrorKind::BrokenPipe` is turned into a quiet `exit(0)`. This matches
the conventional behavior of command-line tools when their output pipe
is closed early (e.g. `hyperfine ... | head -n 0`), and fixes panics in
all run-output paths: the per-benchmark header and results, the speed
comparison summary, and `-`-style exports to stdout. The warnings and
"Note" outputs to stderr are converted the same way.


---------

Co-authored-by: Mathjk <Mathjk@users.noreply.github.com>
Co-authored-by: David Peter <mail@david-peter.de>
2026-10-02 11:18:56 +02:00
David Peter 038f369420 SortOrder field 2024-12-29 14:07:21 +01:00
David Peter 7a9d04d35c Use insta for exporter tests 2024-12-29 14:07:21 +01:00
Hamir Mahal ef1263279d style: simplify string interpolation 2024-06-01 11:07:23 +02:00
David Peter ac617c8714 Add new --sort option
This adds a new `--sort` option to choose the way in which the results
in the speed comparison and the markup exports are ordered.

closes #614
closes #601
2023-06-03 21:34:36 +02:00
David Peter 2793d7b994 Do not export intermediate results to stdout, closes #640 2023-04-20 13:22:00 +02:00
David Peter c44aa1d006 Fix clippy suggestions 2023-03-15 10:13:58 +01:00
David Peter 5f5adda8b4 Prevent creation of file named '-' 2023-03-15 10:13:58 +01:00
Humble Penguin e50050f53d removed unused imports 2023-03-15 09:34:29 +01:00
Humble Penguin 9d0f67838f used cfg!(windows) instead of env::consts::OS 2023-03-15 09:34:29 +01:00
Humble Penguin acf156e5d4 ran cargo fmt 2023-03-15 09:34:29 +01:00
Humble Penguin bbe706bcc1 PR for issue #615 2023-03-15 09:34:29 +01:00
Benjamin Rombaut 5fcb7166a9 add clap deprecation notices 2022-11-19 15:13:30 +01: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 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 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 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 23d9fe2595 Refactor Markdown with Markup by using generic table emitter 2022-05-15 21:37:40 +02:00
David Peter dcfeede18e Move functionality to scheduler 2022-02-22 09:07:40 +01:00
David Peter 5c634c9f2f Move a few modules to util 2022-02-06 20:19:50 +01:00
David Peter e5e4c8c020 New 'benchmark' module folder 2022-02-06 20:19:50 +01:00
David Peter 33f8d03d6b Move build_export_manager to ExportManager 2022-02-06 20:19:50 +01:00
David Peter d7e96928fb Fix format call 2022-02-06 20:19:50 +01:00
David Peter 2040810ce3 Unified error handling 2022-02-06 20:19:50 +01:00
David Peter 8a4e791025 Fix merge conflict 2021-10-17 17:10:46 +02:00
Heikki Hellgren f592155db7 Fix clippy warnings from tests 2021-10-17 17:04:46 +02:00
rhysd f2bfedd3a6 Fix clippy warnings 2021-10-17 17:03:36 +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