diff options
author | Luca Casonato <lucacasonato@yahoo.com> | 2020-10-26 19:57:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 19:57:29 +0100 |
commit | acc201625fd613c6e1e66d1714069726ec2a4b73 (patch) | |
tree | 51e0d2d8045affc097c78a8346b4df8f5ebf1e13 | |
parent | c4d33e8d778aa1b86197f1c54ff8e4e61a2ebf53 (diff) |
chore: add bundle_no_check benchmark (#8130)
-rw-r--r-- | cli/bench/main.rs | 9 | ||||
-rw-r--r-- | test_util/src/lib.rs | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/cli/bench/main.rs b/cli/bench/main.rs index 08aff19e6..0b8f9aa7b 100644 --- a/cli/bench/main.rs +++ b/cli/bench/main.rs @@ -93,6 +93,11 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option<i32>)] = &[ &["bundle", "std/examples/chat/server_test.ts"], None, ), + ( + "bundle_no_check", + &["bundle", "--no-check", "std/examples/chat/server_test.ts"], + None, + ), ]; const RESULT_KEYS: &[&str] = @@ -308,7 +313,7 @@ fn run_strace_benchmarks( deno_exe.to_str().unwrap(), ]) .args(args.iter()) - .stdout(Stdio::null()) + .stdout(Stdio::inherit()) .spawn()? .wait()?; @@ -319,7 +324,7 @@ fn run_strace_benchmarks( thread_count.insert( name.to_string(), Value::Number(Number::from( - strace_result.get("clone").unwrap().calls + 1, + strace_result.get("clone").map(|d| d.calls).unwrap_or(0) + 1, )), ); syscall_count.insert( diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs index eab8bcac6..366f8b6ba 100644 --- a/test_util/src/lib.rs +++ b/test_util/src/lib.rs @@ -1041,6 +1041,7 @@ pub fn parse_wrk_output(output: &str) -> WrkOutput { } } +#[derive(Debug)] pub struct StraceOutput { pub percent_time: f64, pub seconds: f64, |