benchmark_runner.cc
Go to the documentation of this file.
1 // Copyright 2015 Google Inc. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #include "benchmark_runner.h"
16 
17 #include "benchmark/benchmark.h"
18 #include "benchmark_api_internal.h"
19 #include "internal_macros.h"
20 
21 #ifndef BENCHMARK_OS_WINDOWS
22 #ifndef BENCHMARK_OS_FUCHSIA
23 #include <sys/resource.h>
24 #endif
25 #include <sys/time.h>
26 #include <unistd.h>
27 #endif
28 
29 #include <algorithm>
30 #include <atomic>
31 #include <condition_variable>
32 #include <cstdio>
33 #include <cstdlib>
34 #include <fstream>
35 #include <iostream>
36 #include <memory>
37 #include <string>
38 #include <thread>
39 #include <utility>
40 
41 #include "check.h"
42 #include "colorprint.h"
43 #include "commandlineflags.h"
44 #include "complexity.h"
45 #include "counter.h"
46 #include "internal_macros.h"
47 #include "log.h"
48 #include "mutex.h"
49 #include "perf_counters.h"
50 #include "re.h"
51 #include "statistics.h"
52 #include "string_util.h"
53 #include "thread_manager.h"
54 #include "thread_timer.h"
55 
56 namespace benchmark {
57 
58 namespace internal {
59 
61 
62 namespace {
63 
64 static constexpr IterationCount kMaxIterations = 1000000000;
65 
66 BenchmarkReporter::Run CreateRunReport(
69  IterationCount memory_iterations,
70  const MemoryManager::Result& memory_result, double seconds,
71  int64_t repetition_index, int64_t repeats) {
72  // Create report about this benchmark run.
74 
75  report.run_name = b.name();
76  report.family_index = b.family_index();
77  report.per_family_instance_index = b.per_family_instance_index();
78  report.error_occurred = results.has_error_;
79  report.error_message = results.error_message_;
80  report.report_label = results.report_label_;
81  // This is the total iterations across all threads.
82  report.iterations = results.iterations;
83  report.time_unit = b.time_unit();
84  report.threads = b.threads();
85  report.repetition_index = repetition_index;
86  report.repetitions = repeats;
87 
88  if (!report.error_occurred) {
89  if (b.use_manual_time()) {
90  report.real_accumulated_time = results.manual_time_used;
91  } else {
92  report.real_accumulated_time = results.real_time_used;
93  }
94  report.cpu_accumulated_time = results.cpu_time_used;
95  report.complexity_n = results.complexity_n;
96  report.complexity = b.complexity();
97  report.complexity_lambda = b.complexity_lambda();
98  report.statistics = &b.statistics();
99  report.counters = results.counters;
100 
101  if (memory_iterations > 0) {
102  report.has_memory_result = true;
103  report.allocs_per_iter =
104  memory_iterations ? static_cast<double>(memory_result.num_allocs) /
105  memory_iterations
106  : 0;
107  report.max_bytes_used = memory_result.max_bytes_used;
108  }
109 
110  internal::Finish(&report.counters, results.iterations, seconds,
111  b.threads());
112  }
113  return report;
114 }
115 
116 // Execute one thread of benchmark b for the specified number of iterations.
117 // Adds the stats collected for the thread into manager->results.
118 void RunInThread(const BenchmarkInstance* b, IterationCount iters,
119  int thread_id, ThreadManager* manager,
120  PerfCountersMeasurement* perf_counters_measurement) {
122  b->measure_process_cpu_time()
125  State st =
126  b->Run(iters, thread_id, &timer, manager, perf_counters_measurement);
128  << "Benchmark returned before State::KeepRunning() returned false!";
129  {
130  MutexLock l(manager->GetBenchmarkMutex());
131  internal::ThreadManager::Result& results = manager->results;
132  results.iterations += st.iterations();
133  results.cpu_time_used += timer.cpu_time_used();
134  results.real_time_used += timer.real_time_used();
135  results.manual_time_used += timer.manual_time_used();
136  results.complexity_n += st.complexity_length_n();
137  internal::Increment(&results.counters, st.counters);
138  }
139  manager->NotifyThreadComplete();
140 }
141 
142 } // end namespace
143 
146  BenchmarkReporter::PerFamilyRunReports* reports_for_family_)
147  : b(b_),
148  reports_for_family(reports_for_family_),
149  min_time(!IsZero(b.min_time()) ? b.min_time() : FLAGS_benchmark_min_time),
150  repeats(b.repetitions() != 0 ? b.repetitions()
151  : FLAGS_benchmark_repetitions),
152  has_explicit_iteration_count(b.iterations() != 0),
153  pool(b.threads() - 1),
154  iters(has_explicit_iteration_count ? b.iterations() : 1),
155  perf_counters_measurement(
156  PerfCounters::Create(StrSplit(FLAGS_benchmark_perf_counters, ','))),
157  perf_counters_measurement_ptr(perf_counters_measurement.IsValid()
158  ? &perf_counters_measurement
159  : nullptr) {
161  (FLAGS_benchmark_report_aggregates_only ||
162  FLAGS_benchmark_display_aggregates_only);
164  FLAGS_benchmark_report_aggregates_only;
171  BM_CHECK(FLAGS_benchmark_perf_counters.empty() ||
173  << "Perf counters were requested but could not be set up.";
174  }
175 }
176 
178  BM_VLOG(2) << "Running " << b.name().str() << " for " << iters << "\n";
179 
180  std::unique_ptr<internal::ThreadManager> manager;
181  manager.reset(new internal::ThreadManager(b.threads()));
182 
183  // Run all but one thread in separate threads
184  for (std::size_t ti = 0; ti < pool.size(); ++ti) {
185  pool[ti] = std::thread(&RunInThread, &b, iters, static_cast<int>(ti + 1),
186  manager.get(), perf_counters_measurement_ptr);
187  }
188  // And run one thread here directly.
189  // (If we were asked to run just one thread, we don't create new threads.)
190  // Yes, we need to do this here *after* we start the separate threads.
191  RunInThread(&b, iters, 0, manager.get(), perf_counters_measurement_ptr);
192 
193  // The main thread has finished. Now let's wait for the other threads.
194  manager->WaitForAllThreads();
195  for (std::thread& thread : pool) thread.join();
196 
198  // Acquire the measurements/counters from the manager, UNDER THE LOCK!
199  {
200  MutexLock l(manager->GetBenchmarkMutex());
201  i.results = manager->results;
202  }
203 
204  // And get rid of the manager.
205  manager.reset();
206 
207  // Adjust real/manual time stats since they were reported per thread.
208  i.results.real_time_used /= b.threads();
209  i.results.manual_time_used /= b.threads();
210  // If we were measuring whole-process CPU usage, adjust the CPU time too.
211  if (b.measure_process_cpu_time()) i.results.cpu_time_used /= b.threads();
212 
213  BM_VLOG(2) << "Ran in " << i.results.cpu_time_used << "/"
214  << i.results.real_time_used << "\n";
215 
216  // By using KeepRunningBatch a benchmark can iterate more times than
217  // requested, so take the iteration count from i.results.
218  i.iters = i.results.iterations / b.threads();
219 
220  // Base decisions off of real time if requested by this benchmark.
221  i.seconds = i.results.cpu_time_used;
222  if (b.use_manual_time()) {
223  i.seconds = i.results.manual_time_used;
224  } else if (b.use_real_time()) {
225  i.seconds = i.results.real_time_used;
226  }
227 
228  return i;
229 }
230 
232  const IterationResults& i) const {
233  // See how much iterations should be increased by.
234  // Note: Avoid division by zero with max(seconds, 1ns).
235  double multiplier = min_time * 1.4 / std::max(i.seconds, 1e-9);
236  // If our last run was at least 10% of FLAGS_benchmark_min_time then we
237  // use the multiplier directly.
238  // Otherwise we use at most 10 times expansion.
239  // NOTE: When the last run was at least 10% of the min time the max
240  // expansion should be 14x.
241  bool is_significant = (i.seconds / min_time) > 0.1;
242  multiplier = is_significant ? multiplier : 10.0;
243 
244  // So what seems to be the sufficiently-large iteration count? Round up.
245  const IterationCount max_next_iters = static_cast<IterationCount>(
246  std::lround(std::max(multiplier * static_cast<double>(i.iters),
247  static_cast<double>(i.iters) + 1.0)));
248  // But we do have *some* sanity limits though..
249  const IterationCount next_iters = std::min(max_next_iters, kMaxIterations);
250 
251  BM_VLOG(3) << "Next iters: " << next_iters << ", " << multiplier << "\n";
252  return next_iters; // round up before conversion to integer.
253 }
254 
256  const IterationResults& i) const {
257  // Determine if this run should be reported;
258  // Either it has run for a sufficient amount of time
259  // or because an error was reported.
260  return i.results.has_error_ ||
261  i.iters >= kMaxIterations || // Too many iterations already.
262  i.seconds >= min_time || // The elapsed time is large enough.
263  // CPU time is specified but the elapsed real time greatly exceeds
264  // the minimum time.
265  // Note that user provided timers are except from this sanity check.
266  ((i.results.real_time_used >= 5 * min_time) && !b.use_manual_time());
267 }
268 
270  assert(HasRepeatsRemaining() && "Already done all repetitions?");
271 
272  const bool is_the_first_repetition = num_repetitions_done == 0;
274 
275  // We *may* be gradually increasing the length (iteration count)
276  // of the benchmark until we decide the results are significant.
277  // And once we do, we report those last results and exit.
278  // Please do note that the if there are repetitions, the iteration count
279  // is *only* calculated for the *first* repetition, and other repetitions
280  // simply use that precomputed iteration count.
281  for (;;) {
282  i = DoNIterations();
283 
284  // Do we consider the results to be significant?
285  // If we are doing repetitions, and the first repetition was already done,
286  // it has calculated the correct iteration time, so we have run that very
287  // iteration count just now. No need to calculate anything. Just report.
288  // Else, the normal rules apply.
289  const bool results_are_significant = !is_the_first_repetition ||
292 
293  if (results_are_significant) break; // Good, let's report them!
294 
295  // Nope, bad iteration. Let's re-estimate the hopefully-sufficient
296  // iteration count, and run the benchmark again...
297 
299  assert(iters > i.iters &&
300  "if we did more iterations than we want to do the next time, "
301  "then we should have accepted the current iteration run.");
302  }
303 
304  // Oh, one last thing, we need to also produce the 'memory measurements'..
305  MemoryManager::Result memory_result;
306  IterationCount memory_iterations = 0;
307  if (memory_manager != nullptr) {
308  // Only run a few iterations to reduce the impact of one-time
309  // allocations in benchmarks that are not properly managed.
310  memory_iterations = std::min<IterationCount>(16, iters);
312  std::unique_ptr<internal::ThreadManager> manager;
313  manager.reset(new internal::ThreadManager(1));
314  RunInThread(&b, memory_iterations, 0, manager.get(),
316  manager->WaitForAllThreads();
317  manager.reset();
318 
319  memory_manager->Stop(&memory_result);
320  }
321 
322  // Ok, now actually report.
323  BenchmarkReporter::Run report =
324  CreateRunReport(b, i.results, memory_iterations, memory_result, i.seconds,
326 
327  if (reports_for_family) {
329  if (!report.error_occurred) reports_for_family->Runs.push_back(report);
330  }
331 
332  run_results.non_aggregates.push_back(report);
333 
335 }
336 
338  assert(!HasRepeatsRemaining() && "Did not run all repetitions yet?");
339 
340  // Calculate additional statistics over the repetitions of this instance.
342 
343  return std::move(run_results);
344 }
345 
346 } // end namespace internal
347 
348 } // end namespace benchmark
thread_timer.h
benchmark::internal::BenchmarkRunner::run_results
RunResults run_results
Definition: benchmark_runner.h:66
benchmark::internal::BenchmarkInstance::measure_process_cpu_time
bool measure_process_cpu_time() const
Definition: benchmark/src/benchmark_api_internal.h:31
log.h
absl::time_internal::cctz::seconds
std::chrono::duration< std::int_fast64_t > seconds
Definition: abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h:40
benchmark::BenchmarkReporter::Run::family_index
int64_t family_index
Definition: benchmark/include/benchmark/benchmark.h:1449
benchmark::MemoryManager::Start
virtual void Start()=0
benchmark::MemoryManager
Definition: benchmark/include/benchmark/benchmark.h:1629
benchmark::internal::BenchmarkRunner::iters
IterationCount iters
Definition: benchmark_runner.h:79
check.h
benchmark::internal::BenchmarkRunner::perf_counters_measurement_ptr
PerfCountersMeasurement *const perf_counters_measurement_ptr
Definition: benchmark_runner.h:84
benchmark::internal::ThreadManager::NotifyThreadComplete
void NotifyThreadComplete() EXCLUDES(end_cond_mutex_)
Definition: third_party/benchmark/src/thread_manager.h:25
benchmark::State::max_iterations
const IterationCount max_iterations
Definition: benchmark/include/benchmark/benchmark.h:702
benchmark
Definition: bm_alarm.cc:55
benchmark::internal::PerfCountersMeasurement
Definition: perf_counters.h:125
benchmark::internal::IsZero
bool IsZero(double n)
Definition: benchmark/src/benchmark.cc:407
benchmark::internal::ThreadTimer
Definition: thread_timer.h:10
benchmark::State::error_occurred
bool error_occurred() const
Definition: benchmark/include/benchmark/benchmark.h:584
benchmark::BenchmarkReporter::Run::has_memory_result
bool has_memory_result
Definition: benchmark/include/benchmark/benchmark.h:1496
benchmark::BenchmarkName::str
std::string str() const
Definition: benchmark_name.cc:54
benchmark::internal::BenchmarkRunner::perf_counters_measurement
PerfCountersMeasurement perf_counters_measurement
Definition: benchmark_runner.h:83
BM_CHECK
#define BM_CHECK(b)
Definition: benchmark/src/check.h:58
benchmark::BenchmarkReporter::Run::complexity_n
int64_t complexity_n
Definition: benchmark/include/benchmark/benchmark.h:1484
benchmark::internal::BenchmarkRunner::DoOneRepetition
void DoOneRepetition()
Definition: benchmark_runner.cc:269
benchmark::internal::ARM_FileReportAggregatesOnly
@ ARM_FileReportAggregatesOnly
Definition: benchmark/include/benchmark/benchmark.h:491
benchmark::internal::BenchmarkInstance
Definition: benchmark/src/benchmark_api_internal.h:18
benchmark::internal::BenchmarkRunner::b
const benchmark::internal::BenchmarkInstance & b
Definition: benchmark_runner.h:68
benchmark::BenchmarkReporter::Run::run_name
BenchmarkName run_name
Definition: benchmark/include/benchmark/benchmark.h:1448
benchmark::internal::RunResults
Definition: benchmark_runner.h:38
benchmark::internal::ThreadManager::GetBenchmarkMutex
Mutex & GetBenchmarkMutex() const RETURN_CAPABILITY(benchmark_mutex_)
Definition: third_party/benchmark/src/thread_manager.h:17
colorprint.h
benchmark::internal::BenchmarkRunner::BenchmarkRunner
BenchmarkRunner(const benchmark::internal::BenchmarkInstance &b_, BenchmarkReporter::PerFamilyRunReports *reports_for_family)
Definition: benchmark_runner.cc:144
benchmark::MemoryManager::Result::num_allocs
int64_t num_allocs
Definition: benchmark/include/benchmark/benchmark.h:1635
mutex.h
benchmark::internal::ARM_DisplayReportAggregatesOnly
@ ARM_DisplayReportAggregatesOnly
Definition: benchmark/include/benchmark/benchmark.h:493
benchmark_api_internal.h
benchmark::State::counters
UserCounters counters
Definition: benchmark/include/benchmark/benchmark.h:716
benchmark::internal::BenchmarkRunner::PredictNumItersNeeded
IterationCount PredictNumItersNeeded(const IterationResults &i) const
Definition: benchmark_runner.cc:231
benchmark::internal::BenchmarkRunner::GetResults
RunResults && GetResults()
Definition: benchmark_runner.cc:337
statistics.h
benchmark::internal::ThreadManager::Result
Definition: third_party/benchmark/src/thread_manager.h:40
benchmark_runner.h
threads
static uv_thread_t * threads
Definition: threadpool.c:38
benchmark::BenchmarkReporter::Run::repetitions
int64_t repetitions
Definition: benchmark/include/benchmark/benchmark.h:1461
benchmark::internal::ThreadTimer::Create
static ThreadTimer Create()
Definition: thread_timer.h:15
perf_counters.h
benchmark::internal::BenchmarkRunner::ShouldReportIterationResults
bool ShouldReportIterationResults(const IterationResults &i) const
Definition: benchmark_runner.cc:255
benchmark::internal::BenchmarkInstance::name
const BenchmarkName & name() const
Definition: benchmark/src/benchmark_api_internal.h:24
benchmark::internal::BenchmarkRunner::DoNIterations
IterationResults DoNIterations()
Definition: benchmark_runner.cc:177
benchmark::internal::Increment
void Increment(UserCounters *l, UserCounters const &r)
Definition: benchmark/src/counter.cc:49
benchmark::BenchmarkReporter::Run::allocs_per_iter
double allocs_per_iter
Definition: benchmark/include/benchmark/benchmark.h:1497
absl::move
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
Definition: abseil-cpp/absl/utility/utility.h:221
benchmark::internal::BenchmarkRunner::reports_for_family
BenchmarkReporter::PerFamilyRunReports * reports_for_family
Definition: benchmark_runner.h:69
int64_t
signed __int64 int64_t
Definition: stdint-msvc2008.h:89
max
int max
Definition: bloaty/third_party/zlib/examples/enough.c:170
benchmark::IterationCount
uint64_t IterationCount
Definition: benchmark/include/benchmark/benchmark.h:451
benchmark::BenchmarkReporter::Run::error_message
std::string error_message
Definition: benchmark/include/benchmark/benchmark.h:1456
benchmark::BenchmarkReporter::PerFamilyRunReports::Runs
std::vector< BenchmarkReporter::Run > Runs
Definition: benchmark/include/benchmark/benchmark.h:1511
benchmark::BenchmarkReporter::Run::report_label
std::string report_label
Definition: benchmark/include/benchmark/benchmark.h:1454
benchmarks.python.py_benchmark.results
list results
Definition: bloaty/third_party/protobuf/benchmarks/python/py_benchmark.py:145
benchmark::BenchmarkReporter::Run::cpu_accumulated_time
double cpu_accumulated_time
Definition: benchmark/include/benchmark/benchmark.h:1464
benchmark::MemoryManager::Result
Definition: benchmark/include/benchmark/benchmark.h:1631
benchmark::BenchmarkReporter::Run::repetition_index
int64_t repetition_index
Definition: benchmark/include/benchmark/benchmark.h:1460
BM_VLOG
#define BM_VLOG(x)
Definition: third_party/benchmark/src/log.h:70
benchmark::BenchmarkReporter::PerFamilyRunReports::num_runs_done
int num_runs_done
Definition: benchmark/include/benchmark/benchmark.h:1508
benchmark::internal::BenchmarkRunner::IterationResults
Definition: benchmark_runner.h:86
benchmark::internal::BenchmarkInstance::use_manual_time
bool use_manual_time() const
Definition: benchmark/src/benchmark_api_internal.h:33
counter.h
benchmark::BenchmarkReporter::Run::per_family_instance_index
int64_t per_family_instance_index
Definition: benchmark/include/benchmark/benchmark.h:1450
benchmark::internal::BenchmarkRunner::pool
std::vector< std::thread > pool
Definition: benchmark_runner.h:77
min
#define min(a, b)
Definition: qsort.h:83
b
uint64_t b
Definition: abseil-cpp/absl/container/internal/layout_test.cc:53
benchmark::BenchmarkReporter::Run
Definition: benchmark/include/benchmark/benchmark.h:1423
benchmark::internal::RunResults::file_report_aggregates_only
bool file_report_aggregates_only
Definition: benchmark_runner.h:43
benchmark::internal::RunResults::display_report_aggregates_only
bool display_report_aggregates_only
Definition: benchmark_runner.h:42
internal_macros.h
benchmark::StrSplit
std::vector< std::string > StrSplit(const std::string &str, char delim)
Definition: benchmark/src/string_util.cc:166
thread_manager.h
string_util.h
benchmark::internal::memory_manager
MemoryManager * memory_manager
Definition: benchmark_runner.cc:60
benchmark::MemoryManager::Result::max_bytes_used
int64_t max_bytes_used
Definition: benchmark/include/benchmark/benchmark.h:1638
benchmark::BenchmarkReporter::Run::complexity
BigO complexity
Definition: benchmark/include/benchmark/benchmark.h:1482
benchmark::internal::Finish
double Finish(Counter const &c, IterationCount iterations, double cpu_time, double num_threads)
Definition: benchmark/src/counter.cc:20
benchmark::internal::BenchmarkRunner::num_repetitions_done
int num_repetitions_done
Definition: benchmark_runner.h:75
thread_id
static uv_thread_t thread_id
Definition: benchmark-million-async.c:32
benchmark::BenchmarkReporter::Run::real_accumulated_time
double real_accumulated_time
Definition: benchmark/include/benchmark/benchmark.h:1463
benchmark::internal::ARM_Unspecified
@ ARM_Unspecified
Definition: benchmark/include/benchmark/benchmark.h:486
benchmark::internal::BenchmarkInstance::use_real_time
bool use_real_time() const
Definition: benchmark/src/benchmark_api_internal.h:32
benchmark::State
Definition: benchmark/include/benchmark/benchmark.h:503
benchmark::ComputeStats
std::vector< BenchmarkReporter::Run > ComputeStats(const std::vector< BenchmarkReporter::Run > &reports)
Definition: statistics.cc:86
benchmark::BenchmarkReporter::Run::time_unit
TimeUnit time_unit
Definition: benchmark/include/benchmark/benchmark.h:1462
commandlineflags.h
benchmark::BenchmarkReporter::Run::complexity_lambda
BigOFunc * complexity_lambda
Definition: benchmark/include/benchmark/benchmark.h:1483
benchmark::internal::ThreadManager
Definition: third_party/benchmark/src/thread_manager.h:12
re.h
benchmark::BenchmarkReporter::PerFamilyRunReports
Definition: benchmark/include/benchmark/benchmark.h:1501
benchmark::State::iterations
BENCHMARK_ALWAYS_INLINE IterationCount iterations() const
Definition: benchmark/include/benchmark/benchmark.h:683
benchmark::MutexLock
Definition: benchmark/src/mutex.h:87
benchmark::internal::BenchmarkInstance::aggregation_report_mode
AggregationReportMode aggregation_report_mode() const
Definition: benchmark/src/benchmark_api_internal.h:27
benchmark::internal::BenchmarkRunner::repeats
const int repeats
Definition: benchmark_runner.h:72
benchmark::internal::BenchmarkRunner::HasRepeatsRemaining
bool HasRepeatsRemaining() const
Definition: benchmark_runner.h:53
benchmark::internal::PerfCounters
Definition: perf_counters.h:69
benchmark::BenchmarkReporter::Run::error_occurred
bool error_occurred
Definition: benchmark/include/benchmark/benchmark.h:1455
pool
InternalDescriptorPool * pool
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:807
benchmark::BenchmarkReporter::Run::max_bytes_used
int64_t max_bytes_used
Definition: benchmark/include/benchmark/benchmark.h:1498
b_
const char * b_
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/common_unittest.cc:194
internal
Definition: benchmark/test/output_test_helper.cc:20
benchmark::internal::BenchmarkInstance::threads
int threads() const
Definition: benchmark/src/benchmark_api_internal.h:40
absl::types_internal
Definition: abseil-cpp/absl/types/internal/conformance_aliases.h:30
benchmark::internal::ThreadTimer::CreateProcessCpuTime
static ThreadTimer CreateProcessCpuTime()
Definition: thread_timer.h:18
benchmark::internal::RunResults::aggregates_only
std::vector< BenchmarkReporter::Run > aggregates_only
Definition: benchmark_runner.h:40
complexity.h
benchmark::internal::PerfCountersMeasurement::IsValid
bool IsValid() const
Definition: perf_counters.h:132
benchmark::State::complexity_length_n
BENCHMARK_ALWAYS_INLINE int64_t complexity_length_n() const
Definition: benchmark/include/benchmark/benchmark.h:622
benchmark::internal::RunResults::non_aggregates
std::vector< BenchmarkReporter::Run > non_aggregates
Definition: benchmark_runner.h:39
benchmark::BenchmarkReporter::Run::counters
UserCounters counters
Definition: benchmark/include/benchmark/benchmark.h:1493
benchmark::BenchmarkReporter::Run::threads
int64_t threads
Definition: benchmark/include/benchmark/benchmark.h:1459
benchmark::internal::BenchmarkRunner::min_time
const double min_time
Definition: benchmark_runner.h:71
thread
static uv_thread_t thread
Definition: test-async-null-cb.c:29
benchmark::MemoryManager::Stop
virtual void Stop(Result *result)=0
benchmark::BenchmarkReporter::Run::iterations
IterationCount iterations
Definition: benchmark/include/benchmark/benchmark.h:1458
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
benchmark::BenchmarkReporter::Run::statistics
const std::vector< internal::Statistics > * statistics
Definition: benchmark/include/benchmark/benchmark.h:1487
timer
static uv_timer_t timer
Definition: test-callback-stack.c:34
benchmark::internal::BenchmarkRunner::has_explicit_iteration_count
const bool has_explicit_iteration_count
Definition: benchmark_runner.h:73


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:36