mirror of
https://github.com/google/benchmark.git
synced 2024-11-28 15:34:33 +00:00
benchmark.cc: Fix benchmarks_with_threads condition (#1651)
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))
This commit is contained in:
parent
aa59d40f88
commit
885e9f71d6
|
@ -383,7 +383,7 @@ void RunBenchmarks(const std::vector<BenchmarkInstance>& benchmarks,
|
||||||
BenchmarkReporter::PerFamilyRunReports* reports_for_family = nullptr;
|
BenchmarkReporter::PerFamilyRunReports* reports_for_family = nullptr;
|
||||||
if (benchmark.complexity() != oNone)
|
if (benchmark.complexity() != oNone)
|
||||||
reports_for_family = &per_family_reports[benchmark.family_index()];
|
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);
|
runners.emplace_back(benchmark, &perfcounters, reports_for_family);
|
||||||
int num_repeats_of_this_instance = runners.back().GetNumRepeats();
|
int num_repeats_of_this_instance = runners.back().GetNumRepeats();
|
||||||
num_repetitions_total += num_repeats_of_this_instance;
|
num_repetitions_total += num_repeats_of_this_instance;
|
||||||
|
|
Loading…
Reference in a new issue