From 0d814b9f36e53a5e1e4683f79314e345e37dd102 Mon Sep 17 00:00:00 2001 From: Jesse Rosenstock Date: Thu, 17 Aug 2023 11:05:07 +0200 Subject: [PATCH] benchmark.cc: Fix benchmarks_with_threads condition Change condition for `benchmarks_with_threads` from `benchmark.threads() > 0` to `> 1`. `threads()` appears to always be `>= 1`. Introduced in fbc6efa (Refactoring of PerfCounters infrastructure (#1559)) --- src/benchmark.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/benchmark.cc b/src/benchmark.cc index a4fd2e92e9..974cde6cf4 100644 --- a/src/benchmark.cc +++ b/src/benchmark.cc @@ -383,7 +383,7 @@ void RunBenchmarks(const std::vector& benchmarks, BenchmarkReporter::PerFamilyRunReports* reports_for_family = nullptr; if (benchmark.complexity() != oNone) reports_for_family = &per_family_reports[benchmark.family_index()]; - benchmarks_with_threads += (benchmark.threads() > 0); + benchmarks_with_threads += (benchmark.threads() > 1); runners.emplace_back(benchmark, &perfcounters, reports_for_family); int num_repeats_of_this_instance = runners.back().GetNumRepeats(); num_repetitions_total += num_repeats_of_this_instance;