mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-03 17:27:33 +00:00
Initial support for randomized environment variables
This commit is contained in:
1 parent
4d3dd42d89
commit
46e7e4152a
4 files changed
+273
-206
No files matched your search
@@ -47,20 +47,19 @@ pub fn time_shell_command(
|
||||
failure_action: CmdFailureAction,
|
||||
shell_spawning_time: Option<TimingResult>,
|
||||
) -> io::Result<(TimingResult, bool)> {
|
||||
let wallclock_timer = WallClockTimer::start();
|
||||
|
||||
let (stdout, stderr) = if show_output {
|
||||
(Stdio::inherit(), Stdio::inherit())
|
||||
} else {
|
||||
(Stdio::null(), Stdio::null())
|
||||
};
|
||||
|
||||
let wallclock_timer = WallClockTimer::start();
|
||||
let result = execute_and_time(stdout, stderr, &command.get_shell_command(), shell)?;
|
||||
let mut time_real = wallclock_timer.stop();
|
||||
|
||||
let mut time_user = result.user_time;
|
||||
let mut time_system = result.system_time;
|
||||
|
||||
let mut time_real = wallclock_timer.stop();
|
||||
|
||||
if failure_action == CmdFailureAction::RaiseError && !result.status.success() {
|
||||
return Err(io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
|
||||
Reference in new issue
Block a user