From 18150b3a78cd02c7c68d4dfced036fd812a17536 Mon Sep 17 00:00:00 2001 From: William Perron Date: Mon, 18 Jan 2021 05:00:51 -0500 Subject: bench: fix off-by-one error in thread_count (#9145) --- cli/bench/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/bench') diff --git a/cli/bench/main.rs b/cli/bench/main.rs index 0443e4f0c..d3f00ee2c 100644 --- a/cli/bench/main.rs +++ b/cli/bench/main.rs @@ -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); -- cgit v1.2.3