Skip to content

fix: skip empty benchmarks to avoid infinite loops when CODSPEED_MODE=off#50

Open
OsamaAhmad00 wants to merge 1 commit into
CodSpeedHQ:mainfrom
OsamaAhmad00:main
Open

fix: skip empty benchmarks to avoid infinite loops when CODSPEED_MODE=off#50
OsamaAhmad00 wants to merge 1 commit into
CodSpeedHQ:mainfrom
OsamaAhmad00:main

Conversation

@OsamaAhmad00
Copy link
Copy Markdown

When CODSPEED_MODE=off, empty benchmark bodies (which don't run the KeepRunning() loop) fail to advance iteration counts. Instead of triggering a hard BM_CHECK failure or stalling in an infinite loop, the runner now intercepts the state and gracefully drops a meaningful error message.

References:

…=off

When `CODSPEED_MODE=off`, empty benchmark bodies (which don't run the
`KeepRunning()` loop) fail to advance iteration counts. Instead of
triggering a hard `BM_CHECK` failure or stalling in an infinite loop,
the runner now intercepts the state and gracefully drops a meaningful
error message.

References:
- Issue: google/benchmark#1962
- Pull Request: google/benchmark#1976
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.

1 participant