1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-21 23:04:45 -05:00

bench: fix off-by-one error in thread_count (#9145)

This commit is contained in:
William Perron 2021-01-18 05:00:51 -05:00 committed by GitHub
parent 2077864a8d
commit 18150b3a78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -340,7 +340,7 @@ fn run_strace_benchmarks(
file.as_file_mut().read_to_string(&mut output)?;
let strace_result = test_util::parse_strace_output(&output);
let clone = strace_result.get("clone").map(|d| d.calls).unwrap_or(0);
let clone = strace_result.get("clone").map(|d| d.calls).unwrap_or(0) + 1;
let total = strace_result.get("total").unwrap().calls;
thread_count.insert(name.to_string(), clone);
syscall_count.insert(name.to_string(), total);