mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 08:55:36 +00:00
Fix CodSpeed: use CODSPEED_ANALYSIS not CODSPEED_SIMULATION
CodSpeed's CMake uses CODSPEED_ANALYSIS (not CODSPEED_SIMULATION) for simulation mode. This define gates all the actual benchmark measurement hooks in benchmark_runner.cpp and benchmark.h. Without it, benchmarks run normally but CodSpeed doesn't detect them as instrumented.
This commit is contained in:
@@ -54,7 +54,7 @@ def run_benchmarks(selected_components: list[str], build_only: bool = False) ->
|
||||
project_root = Path(__file__).resolve().parent.parent
|
||||
codspeed_flags = [
|
||||
"-DCODSPEED_ENABLED",
|
||||
"-DCODSPEED_SIMULATION",
|
||||
"-DCODSPEED_ANALYSIS",
|
||||
f'-DCODSPEED_ROOT_DIR=\\"{project_root}\\"',
|
||||
]
|
||||
pio_options = {
|
||||
|
||||
@@ -140,7 +140,7 @@ def _write_library_json(
|
||||
# CodSpeed instrumentation flags
|
||||
# https://codspeed.io/docs/benchmarks/cpp#custom-build-systems
|
||||
"-DCODSPEED_ENABLED",
|
||||
"-DCODSPEED_SIMULATION",
|
||||
"-DCODSPEED_ANALYSIS",
|
||||
f'-DCODSPEED_VERSION=\\"{version}\\"',
|
||||
f'-DCODSPEED_ROOT_DIR=\\"{project_root}\\"',
|
||||
'-DCODSPEED_MODE_DISPLAY=\\"simulation\\"',
|
||||
|
||||
Reference in New Issue
Block a user