mirror of
https://github.com/esphome/esphome.git
synced 2026-09-15 17:18:40 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user