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