summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2023-03-27 20:15:00 +0530
committerGitHub <noreply@github.com>2023-03-27 14:45:00 +0000
commit9ebce6e725dd0b33aea20025995fb1e790b92df5 (patch)
tree239d8b8c51b7f39188d33b2f232f27e53bfd0498 /cli
parent357bcfcf79fee92195e37bb3f05e247908f207c5 (diff)
fix(cli/bench): look for clone3 syscalls for thread count (#18456)
Diffstat (limited to 'cli')
-rw-r--r--cli/bench/main.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/cli/bench/main.rs b/cli/bench/main.rs
index 02c775e8f..48598a9b0 100644
--- a/cli/bench/main.rs
+++ b/cli/bench/main.rs
@@ -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);