Skip to content

Commit

Permalink
benchmark.cc: Fix benchmarks_with_threads condition (#1651)
Browse files Browse the repository at this point in the history
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))
  • Loading branch information
jmr committed Aug 17, 2023
1 parent aa59d40 commit 885e9f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ void RunBenchmarks(const std::vector<BenchmarkInstance>& 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;
Expand Down

0 comments on commit 885e9f7

Please sign in to comment.