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