File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
google_benchmark/include/benchmark Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1065,9 +1065,16 @@ struct State::StateIterator {
10651065 bool operator !=(StateIterator const &) const {
10661066 if (BENCHMARK_BUILTIN_EXPECT (cached_ != 0 , true )) return true ;
10671067
1068+
10681069#if defined(CODSPEED_INSTRUMENTATION) || defined(CODSPEED_WALLTIME)
10691070 measurement_stop ();
10701071#endif
1072+ #ifdef CODSPEED_INSTRUMENTATION
1073+ if (parent_->codspeed_ != NULL ) {
1074+ parent_->codspeed_ ->end_benchmark ();
1075+ }
1076+ #endif
1077+
10711078 parent_->FinishKeepRunning ();
10721079 return false ;
10731080 }
@@ -1083,6 +1090,11 @@ inline BENCHMARK_ALWAYS_INLINE State::StateIterator State::begin() {
10831090inline BENCHMARK_ALWAYS_INLINE State::StateIterator State::end () {
10841091 StartKeepRunning ();
10851092
1093+ #ifdef CODSPEED_INSTRUMENTATION
1094+ if (parent_->codspeed_ != NULL ) {
1095+ parent_->codspeed_ ->start_benchmark ();
1096+ }
1097+ #endif
10861098#if defined(CODSPEED_INSTRUMENTATION) || defined(CODSPEED_WALLTIME)
10871099 measurement_start ();
10881100#endif
You can’t perform that action at this time.
0 commit comments