Skip to content

Commit bac36ba

Browse files
committed
fix: call stop_benchmark in google benchmark
1 parent 9b47f73 commit bac36ba

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

core/src/codspeed.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ void CodSpeed::start_benchmark(const std::string &name) {
8585
}
8686

8787
void CodSpeed::end_benchmark() {
88-
measurement_stop(current_benchmark);
8988
benchmarked.push_back(current_benchmark);
9089
std::string action_str = is_instrumented ? "Measured" : "Checked";
9190
std::string group_str =

google_benchmark/include/benchmark/benchmark.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,7 @@ struct State::StateIterator {
10661066
if (BENCHMARK_BUILTIN_EXPECT(cached_ != 0, true)) return true;
10671067
#ifdef CODSPEED_INSTRUMENTATION
10681068
if (parent_->codspeed_ != NULL) {
1069+
measurement_stop();
10691070
parent_->codspeed_->end_benchmark();
10701071
}
10711072
#endif

0 commit comments

Comments
 (0)