mirror of
https://github.com/esphome/esphome.git
synced 2026-08-31 10:06:03 +00:00
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.