mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-28 16:18:57 +00:00
Exclude entire cputime file, force basic output
This commit is contained in:
1 parent
1ddf729c7a
commit
ff798ad615
3 files changed
+10
-4
No files matched your search
@@ -100,8 +100,8 @@ pub fn time_shell_command(
|
||||
) -> io::Result<(TimingResult, bool)> {
|
||||
let start = Instant::now();
|
||||
|
||||
let status = Command::new("sh")
|
||||
.arg("-c")
|
||||
let status = Command::new("cmd")
|
||||
// .arg("-c")
|
||||
.arg(shell_cmd)
|
||||
.stdin(Stdio::null())
|
||||
.stdout(Stdio::null())
|
||||
@@ -129,8 +129,8 @@ pub fn time_shell_command(
|
||||
Ok((
|
||||
TimingResult {
|
||||
time_real,
|
||||
time_user: 0,
|
||||
time_system: 0,
|
||||
time_user: 0f64,
|
||||
time_system: 0f64,
|
||||
},
|
||||
status.success(),
|
||||
))
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#![cfg(not(target_os = "windows"))]
|
||||
|
||||
use libc::{getrusage, rusage, RUSAGE_CHILDREN};
|
||||
|
||||
use std::mem;
|
||||
|
||||
@@ -147,6 +147,10 @@ fn main() {
|
||||
},
|
||||
};
|
||||
|
||||
if cfg!(target_os = "windows") {
|
||||
options.output_style = OutputStyleOption::Basic;
|
||||
}
|
||||
|
||||
if options.output_style == OutputStyleOption::Basic {
|
||||
colored::control::set_override(false);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user