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:
Christian Duerr authored and David Peter committed 2018-05-22 22:54:08 +02:00
1 parent 1011eef7f3
commit 4be435436e
5 files changed
+63 -21

No files matched your search

+4
View File
@@ -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,
}
}
}