Ifdef out WarnIfComponentBlockingGuard for benchmark builds

Add USE_BENCHMARK define to benchmark build flags. Guard the
warn_blocking call in finish() with #ifndef USE_BENCHMARK so
scheduler benchmarks using fake monotonic time don't trigger
the underflow (fake now > real millis()).

Remove BenchComponent — no longer needed with the ifdef.
This commit is contained in:
J. Nick Koston
2026-03-17 01:16:34 -10:00
parent e01670eed8
commit 804e2330ec
3 changed files with 8 additions and 15 deletions
+1
View File
@@ -34,6 +34,7 @@ PLATFORMIO_OPTIONS = {
"-O2", # optimize for speed (CodSpeed recommends RelWithDebInfo)
"-g", # debug symbols for profiling
USE_TIME_TIMEZONE_FLAG,
"-DUSE_BENCHMARK", # disable WarnIfComponentBlockingGuard in finish()
],
# Use deep+ LDF mode to ensure PlatformIO detects the benchmark
# library dependency from nested includes.