mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-02 17:11:28 +00:00
Allow forwarding benchmark's stdout to hyperfine
This change makes it possible to forward the stdout of the command the user tries to benchmark to hyperfine's stdout using the `--print-stdout` flag. This should be irrelevant for most use-cases, however it makes it possible to get some crude benchmarks of terminal emulators similar to what's currently often done with `time cat file`.
This commit is contained in:
1 parent
1011eef7f3
commit
4be435436e
5 files changed
+63
-21
No files matched your search
@@ -89,6 +89,9 @@ pub struct HyperfineOptions {
|
||||
|
||||
/// What color mode to use for output
|
||||
pub output_style: OutputStyleOption,
|
||||
|
||||
/// Forward benchmark's stdout to hyperfine's stdout
|
||||
pub print_stdout: bool,
|
||||
}
|
||||
|
||||
impl Default for HyperfineOptions {
|
||||
@@ -100,6 +103,7 @@ impl Default for HyperfineOptions {
|
||||
failure_action: CmdFailureAction::RaiseError,
|
||||
preparation_command: None,
|
||||
output_style: OutputStyleOption::Full,
|
||||
print_stdout: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user