Lines Matching full:state
66 void BM_error_no_running(benchmark::State& state) { in BM_error_no_running() argument
67 state.SkipWithError("error message"); in BM_error_no_running()
72 void BM_error_before_running(benchmark::State& state) { in BM_error_before_running() argument
73 state.SkipWithError("error message"); in BM_error_before_running()
74 while (state.KeepRunning()) { in BM_error_before_running()
81 void BM_error_before_running_batch(benchmark::State& state) { in BM_error_before_running_batch() argument
82 state.SkipWithError("error message"); in BM_error_before_running_batch()
83 while (state.KeepRunningBatch(17)) { in BM_error_before_running_batch()
90 void BM_error_before_running_range_for(benchmark::State& state) { in BM_error_before_running_range_for() argument
91 state.SkipWithError("error message"); in BM_error_before_running_range_for()
92 for (auto _ : state) { in BM_error_before_running_range_for()
99 void BM_error_during_running(benchmark::State& state) { in BM_error_during_running() argument
101 while (state.KeepRunning()) { in BM_error_during_running()
102 if (state.range(0) == 1 && state.thread_index() <= (state.threads() / 2)) { in BM_error_during_running()
105 state.SkipWithError("error message"); in BM_error_during_running()
107 state.PauseTiming(); in BM_error_during_running()
108 state.ResumeTiming(); in BM_error_during_running()
122 void BM_error_during_running_ranged_for(benchmark::State& state) { in BM_error_during_running_ranged_for() argument
123 assert(state.max_iterations > 3 && "test requires at least a few iterations"); in BM_error_during_running_ranged_for()
126 for (auto It = state.begin(), End = state.end(); It != End; ++It) { in BM_error_during_running_ranged_for()
127 if (state.range(0) == 1) { in BM_error_during_running_ranged_for()
131 state.SkipWithError("error message"); in BM_error_during_running_ranged_for()
144 void BM_error_after_running(benchmark::State& state) { in BM_error_after_running() argument
145 for (auto _ : state) { in BM_error_after_running()
146 auto iterations = double(state.iterations()) * double(state.iterations()); in BM_error_after_running()
149 if (state.thread_index() <= (state.threads() / 2)) in BM_error_after_running()
150 state.SkipWithError("error message"); in BM_error_after_running()
158 void BM_error_while_paused(benchmark::State& state) { in BM_error_while_paused() argument
160 while (state.KeepRunning()) { in BM_error_while_paused()
161 if (state.range(0) == 1 && state.thread_index() <= (state.threads() / 2)) { in BM_error_while_paused()
164 state.PauseTiming(); in BM_error_while_paused()
165 state.SkipWithError("error message"); in BM_error_while_paused()
167 state.PauseTiming(); in BM_error_while_paused()
168 state.ResumeTiming(); in BM_error_while_paused()