Commit 57faaec
committed
fix: skip empty benchmarks to avoid infinite loops when CODSPEED_MODE=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#19761 parent 1c22e59 commit 57faaec
2 files changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
148 | 151 | | |
149 | 152 | | |
150 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
184 | 193 | | |
185 | 194 | | |
186 | 195 | | |
| |||
0 commit comments