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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
if: matrix.codspeed-mode != 'off'
with:
mode: ${{ matrix.codspeed-mode }}
upload-url: https://api.staging.preview.codspeed.io/upload
run: examples/google_benchmark_cmake/build/benchmark_example

bazel-integration-tests:
Expand Down Expand Up @@ -132,6 +133,7 @@ jobs:
if: matrix.codspeed-mode != 'off'
with:
mode: ${{ matrix.codspeed-mode }}
upload-url: https://api.staging.preview.codspeed.io/upload
run: bazel run //examples/google_benchmark_bazel:my_benchmark --@codspeed_core//:codspeed_mode=${{ matrix.codspeed-mode }} --@codspeed_core//:strict_warnings=on

cmake-build:
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
callgrind_stop_instrumentation();
#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
callgrind_start_instrumentation();
#endif
}

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