mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
fix(cli/bench): look for clone3 syscalls for thread count (#18456)
This commit is contained in:
parent
357bcfcf79
commit
9ebce6e725
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)?;
|
||||
|
||||
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;
|
||||
thread_count.insert(name.to_string(), clone as i64);
|
||||
syscall_count.insert(name.to_string(), total as i64);
|
||||
|
|
Loading…
Reference in a new issue