Home | History | Annotate | Download | only in test

Lines Matching refs:state

64 void BM_error_before_running(benchmark::State& state) {
65 state.SkipWithError("error message");
66 while (state.KeepRunning()) {
73 void BM_error_before_running_range_for(benchmark::State& state) {
74 state.SkipWithError("error message");
75 for (auto _ : state) {
82 void BM_error_during_running(benchmark::State& state) {
84 while (state.KeepRunning()) {
85 if (state.range(0) == 1 && state.thread_index <= (state.threads / 2)) {
88 state.SkipWithError("error message");
90 state.PauseTiming();
91 state.ResumeTiming();
105 void BM_error_during_running_ranged_for(benchmark::State& state) {
106 assert(state.max_iterations > 3 && "test requires at least a few iterations");
109 for (auto It = state.begin(), End = state.end(); It != End; ++It) {
110 if (state.range(0) == 1) {
113 state.SkipWithError("error message");
128 void BM_error_after_running(benchmark::State& state) {
129 for (auto _ : state) {
130 benchmark::DoNotOptimize(state.iterations());
132 if (state.thread_index <= (state.threads / 2))
133 state.SkipWithError("error message");
141 void BM_error_while_paused(benchmark::State& state) {
143 while (state.KeepRunning()) {
144 if (state.range(0) == 1 && state.thread_index <= (state.threads / 2)) {
147 state.PauseTiming();
148 state.SkipWithError("error message");
150 state.PauseTiming();
151 state.ResumeTiming();