diff options
| author | cirakg <cirakg@cirakg.xyz> | 2026-10-21 03:55:10 +0200 |
|---|---|---|
| committer | cirakg <cirakg@cirakg.xyz> | 2026-10-21 03:55:10 +0200 |
| commit | 56e0c351bb95cfdf63aa76ab8c5d725a694bad63 (patch) | |
| tree | e99c7af6eca0656948279055c20a5f87d855d4c8 /tools/check_budgets.py | |
| parent | 5e8ac1e2f5a660e55ea132996e1d5730cfa4fa64 (diff) | |
test(build): add make watchdog, the glance memory budget and the glance screenshot
- make watchdog (in make ci): a stress build encodes, packs, turns into
runs and draws the largest code of every 2D symbology at two steps per
event on the Forerunner 255S and 70; it fails on a watchdog trip, and
the last code left on the screen must decode (bitmap path on the 70).
- make memtest checks the glance (DIAG glance, budget 70 % of 64 KB).
- screenshots.sh launches the app again after the flow and compares the
glance with the favourite's code (glance_code.png on 7 watches); the
About goldens show 0.8.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tools/check_budgets.py')
| -rw-r--r-- | tools/check_budgets.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/check_budgets.py b/tools/check_budgets.py index 8b55a2b..8219a6d 100644 --- a/tools/check_budgets.py +++ b/tools/check_budgets.py @@ -7,6 +7,8 @@ Two kinds of lines are read from build/diag/<device>.log: DIAG first_frame startup_ms=1 mem_used=6984 mem_total=781888 printed by the debug build (source/util/Diag.mc) after its first frame; + DIAG glance mem_used=12552 mem_total=65536 + printed by the glance after its first draw (the simulator starts there); HARNESS first_frame wall_ms=2310 added by app-diag.sh: wall-clock time from launching the app with monkeydo until that DIAG line appeared, which includes loading the @@ -52,7 +54,11 @@ def measure(kind: str, events: dict[str, dict[str, float]]) -> dict[str, float]: values["first_frame_wall_ms"] = harness["wall_ms"] return values total = frame["mem_total"] - return {"mem_used_fraction": frame["mem_used"] / total if total else 1.0} + values = {"mem_used_fraction": frame["mem_used"] / total if total else 1.0} + glance = events.get("DIAG.glance") + if glance is not None: + values["glance_mem_used_fraction"] = glance["mem_used"] / glance["mem_total"] if glance["mem_total"] else 1.0 + return values def main(argv: list[str] | None = None) -> int: |
