[ci] Parse importtime-waterfall HAR JSON; raise budget for CI runner

The previous parser walked `-X importtime` stderr by hand (string-splitting
on `|`, indent-width math). Replace it with a load of the HAR JSON that
importtime-waterfall already produces: each entry carries the module name,
self-time, and cumulative — no tree reconstruction needed. Drops the
hand-rolled retry loop too, since importtime-waterfall does best-of-6
internally.

The committed budget (75.2ms) was seeded on a fast local machine; GHA
runners measured 122.8ms, so the first CI run tripped the check. Reset
the baseline to 123ms with a 25% margin (ceiling ~154ms) to absorb GHA
variance. Tighten later once we have several data points.

Adds unit tests for should_run_import_time across the trigger matrix and
wires the new mock into the existing test_main_* suite.
This commit is contained in:
J. Nick Koston
2026-04-23 14:20:31 -05:00
parent 0dd2a57ba4
commit 900232be21
3 changed files with 106 additions and 82 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
{
"target_module": "esphome.__main__",
"margin_pct": 15,
"cumulative_us": 75199
"margin_pct": 25,
"cumulative_us": 123000
}