Lines Matching refs:state
25 void BM_Counters_Simple(benchmark::State& state) {
26 for (auto _ : state) {
28 state.counters["foo"] = 1;
29 state.counters["bar"] = 2 * static_cast<double>(state.iterations());
67 void BM_Counters_WithBytesAndItemsPSec(benchmark::State& state) {
68 for (auto _ : state) {
70 auto iterations = state.iterations();
73 state.counters["foo"] = 1;
74 state.counters["bar"] = ++num_calls1;
75 state.SetBytesProcessed(364);
76 state.SetItemsProcessed(150);
119 void BM_Counters_Rate(benchmark::State& state) {
120 for (auto _ : state) {
122 auto iterations = state.iterations();
126 state.counters["foo"] = bm::Counter{1, bm::Counter::kIsRate};
127 state.counters["bar"] = bm::Counter{2, bm::Counter::kIsRate};
163 void BM_Invert(benchmark::State& state) {
164 for (auto _ : state) {
166 auto iterations = state.iterations();
170 state.counters["foo"] = bm::Counter{0.0001, bm::Counter::kInvert};
171 state.counters["bar"] = bm::Counter{10000, bm::Counter::kInvert};
204 void BM_Counters_InvertedRate(benchmark::State& state) {
205 for (auto _ : state) {
207 auto iterations = state.iterations();
211 state.counters["foo"] =
213 state.counters["bar"] =
251 void BM_Counters_Threads(benchmark::State& state) {
252 for (auto _ : state) {
254 state.counters["foo"] = 1;
255 state.counters["bar"] = 2;
291 void BM_Counters_AvgThreads(benchmark::State& state) {
292 for (auto _ : state) {
295 state.counters["foo"] = bm::Counter{1, bm::Counter::kAvgThreads};
296 state.counters["bar"] = bm::Counter{2, bm::Counter::kAvgThreads};
333 void BM_Counters_AvgThreadsRate(benchmark::State& state) {
334 for (auto _ : state) {
336 auto iterations = state.iterations();
340 state.counters["foo"] = bm::Counter{1, bm::Counter::kAvgThreadsRate};
341 state.counters["bar"] = bm::Counter{2, bm::Counter::kAvgThreadsRate};
378 void BM_Counters_IterationInvariant(benchmark::State& state) {
379 for (auto _ : state) {
382 state.counters["foo"] = bm::Counter{1, bm::Counter::kIsIterationInvariant};
383 state.counters["bar"] = bm::Counter{2, bm::Counter::kIsIterationInvariant};
421 void BM_Counters_kIsIterationInvariantRate(benchmark::State& state) {
422 for (auto _ : state) {
424 auto iterations = state.iterations();
428 state.counters["foo"] =
430 state.counters["bar"] =
471 void BM_Counters_AvgIterations(benchmark::State& state) {
472 for (auto _ : state) {
475 state.counters["foo"] = bm::Counter{1, bm::Counter::kAvgIterations};
476 state.counters["bar"] = bm::Counter{2, bm::Counter::kAvgIterations};
513 void BM_Counters_kAvgIterationsRate(benchmark::State& state) {
514 for (auto _ : state) {
516 auto iterations = state.iterations();
520 state.counters["foo"] = bm::Counter{1, bm::Counter::kAvgIterationsRate};
521 state.counters["bar"] =