Skip to content

Conversation

@not-matthias
Copy link
Member

No description provided.

@not-matthias not-matthias changed the title fix: codspeed cpp fix warmup being sampled by perf fix: warmup being sampled by perf Oct 30, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds conditional measurement control for CodSpeed wall-time instrumentation based on whether benchmark warmup has completed. The intent is to exclude warmup iterations from measurements.

  • Added IsWarmupDone() getter method to BenchmarkRunner class
  • Modified CodSpeed measurement logic to only start/stop measurements after warmup completion

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
google_benchmark/src/benchmark_runner.h Added IsWarmupDone() public getter to expose warmup completion state
google_benchmark/src/benchmark.cc Modified CODSPEED_WALLTIME measurement to conditionally start/stop based on warmup state

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 30, 2025

CodSpeed Performance Report

Merging #32 will degrade performances by 17.54%

Comparing cod-1589-codspeed-cpp-fix-warmup-being-sampled-by-perf (1cac95e) with cod-1575-codspeed-cpp-support-custom-benchmark-name (a34fdd1)

Summary

⚡ 4 improvements
❌ 4 regressions
✅ 192 untouched

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Mode Benchmark BASE HEAD Change
Simulation BM_sleep_100ms 396.7 µs 473.3 µs -16.19%
Simulation BM_sleep_10ms 38.8 µs 47 µs -17.54%
Simulation BM_sleep_1ms 3.7 µs 4.4 µs -15.43%
Simulation BM_sleep_50ms 198.6 µs 235.3 µs -15.58%
Simulation BM_sleep_100ms 771.1 µs 478.1 µs +61.29%
Simulation BM_sleep_10ms 76 µs 47.7 µs +59.25%
Simulation BM_sleep_1ms 6.8 µs 4.4 µs +55.15%
Simulation BM_sleep_50ms 385.5 µs 237.8 µs +62.12%

@not-matthias not-matthias force-pushed the cod-1589-codspeed-cpp-fix-warmup-being-sampled-by-perf branch from ec8d562 to 1cac95e Compare October 30, 2025 15:13
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1575-codspeed-cpp-support-custom-benchmark-name branch from a34fdd1 to cf778ec Compare October 30, 2025 16:09
Base automatically changed from cod-1575-codspeed-cpp-support-custom-benchmark-name to main October 30, 2025 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants