mirror of
https://github.com/denoland/deno.git
synced 2025-01-07 06:46:59 -05:00
fix(cli/bench): look for clone3 syscalls for thread count (#18456)
This commit is contained in:
parent
e3a104fdaa
commit
7c6ef81267
1 changed files with 8 additions and 1 deletions
|
@ -524,7 +524,14 @@ async fn main() -> Result<()> {
|
||||||
file.as_file_mut().read_to_string(&mut output)?;
|
file.as_file_mut().read_to_string(&mut output)?;
|
||||||
|
|
||||||
let strace_result = test_util::parse_strace_output(&output);
|
let strace_result = test_util::parse_strace_output(&output);
|
||||||
let clone = strace_result.get("clone").map(|d| d.calls).unwrap_or(0) + 1;
|
let clone =
|
||||||
|
strace_result
|
||||||
|
.get("clone")
|
||||||
|
.map(|d| d.calls)
|
||||||
|
.unwrap_or_else(|| {
|
||||||
|
strace_result.get("clone3").map(|d| d.calls).unwrap_or(0)
|
||||||
|
})
|
||||||
|
+ 1;
|
||||||
let total = strace_result.get("total").unwrap().calls;
|
let total = strace_result.get("total").unwrap().calls;
|
||||||
thread_count.insert(name.to_string(), clone as i64);
|
thread_count.insert(name.to_string(), clone as i64);
|
||||||
syscall_count.insert(name.to_string(), total as i64);
|
syscall_count.insert(name.to_string(), total as i64);
|
||||||
|
|
Loading…
Reference in a new issue