Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions google_benchmark/include/benchmark/benchmark.h
Original file line number Diff line number Diff line change
Expand Up @@ -1074,9 +1074,6 @@ struct State::StateIterator {
if (BENCHMARK_BUILTIN_EXPECT(cached_ != 0, true)) {
return true;
}
#ifdef CODSPEED_ANALYSIS
measurement_stop();
#endif
parent_->FinishKeepRunning();

#ifdef CODSPEED_ANALYSIS
Expand All @@ -1103,9 +1100,6 @@ inline BENCHMARK_ALWAYS_INLINE State::StateIterator State::end() {
#endif

StartKeepRunning();
#ifdef CODSPEED_ANALYSIS
measurement_start();
#endif
return StateIterator();
}

Expand Down
8 changes: 7 additions & 1 deletion google_benchmark/src/benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "codspeed.h"
#include "internal_macros.h"

#ifdef CODSPEED_WALLTIME
#if defined(CODSPEED_WALLTIME) || defined(CODSPEED_ANALYSIS)
#include "measurement.hpp"
#endif

Expand Down Expand Up @@ -272,6 +272,9 @@ void State::PauseTiming() {
#ifdef CODSPEED_WALLTIME
uint64_t pause_timestamp = measurement_current_timestamp();
#endif
#ifdef CODSPEED_ANALYSIS
measurement_stop();
#endif

// Add in time accumulated so far
BM_CHECK(started_ && !finished_ && !skipped());
Expand Down Expand Up @@ -310,6 +313,9 @@ void State::ResumeTiming() {
BM_CHECK(resume_timestamp_ == 0);
resume_timestamp_ = measurement_current_timestamp();
#endif
#ifdef CODSPEED_ANALYSIS
measurement_start();
#endif
}

void State::SkipWithMessage(const std::string& msg) {
Expand Down
Loading