Fix scheduler firing benchmark: no inner loop, warm-up call

- Revert component.h change (no core changes for benchmarks)
- Remove -DWARN_IF_BLOCKING_OVER_MS from build flags (can't shadow constexpr)
- Drop inner loop — 5 heap pops + callbacks + pushes per call is well
  above CodSpeed's 60ns instrumentation overhead
- Add warm-up call before benchmark loop to trigger the blocking guard
  once and ramp the threshold
- interval=0 causes infinite loop, must use interval=1 with fake time
This commit is contained in:
J. Nick Koston
2026-03-17 01:05:04 -10:00
parent ec60e2c228
commit 1f9380ddc0
2 changed files with 11 additions and 13 deletions
-4
View File
@@ -34,10 +34,6 @@ PLATFORMIO_OPTIONS = {
"-O2", # optimize for speed (CodSpeed recommends RelWithDebInfo)
"-g", # debug symbols for profiling
USE_TIME_TIMEZONE_FLAG,
# Disable WarnIfComponentBlockingGuard check — scheduler benchmarks
# use fake monotonic time ahead of real millis(), causing uint32_t
# underflow in the guard's (millis() - started_) calculation.
"-DWARN_IF_BLOCKING_OVER_MS=UINT32_MAX",
],
# Use deep+ LDF mode to ensure PlatformIO detects the benchmark
# library dependency from nested includes.