mirror of
https://github.com/esphome/esphome.git
synced 2026-09-16 01:28:39 +00:00
Add -DNDEBUG to benchmark builds
The benchmark library warns "Library was built as DEBUG" without NDEBUG. This enables debug assertions and disables optimizations in the benchmark framework, causing instrumentation overhead to show up in profiles.
This commit is contained in:
@@ -53,6 +53,7 @@ def run_benchmarks(selected_components: list[str], build_only: bool = False) ->
|
||||
# CODSPEED_ROOT_DIR is used to display relative file paths in reports.
|
||||
project_root = Path(__file__).resolve().parent.parent
|
||||
codspeed_flags = [
|
||||
"-DNDEBUG",
|
||||
"-DCODSPEED_ENABLED",
|
||||
"-DCODSPEED_ANALYSIS",
|
||||
f'-DCODSPEED_ROOT_DIR=\\"{project_root}\\"',
|
||||
|
||||
Reference in New Issue
Block a user