test: add offerings startup perf tester app#3743
Conversation
Generated by 🚫 Danger |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
#3742 made the UiConfig constructor require app/localizations/variableConfig, so PerfCycleRunner's `uiConfig == UiConfig()` no longer compiles. Drop the uiConfigIsDefault diagnostic (keep the ui_config timing) so the app builds against current main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
9eccdc9 to
2c68499
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3743 +/- ##
=======================================
Coverage 80.31% 80.31%
=======================================
Files 402 402
Lines 16452 16452
Branches 2351 2351
=======================================
Hits 13214 13214
Misses 2305 2305
Partials 933 933 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Added post-readiness memory measurements to this perftester PR. Each JSONL row now records before/after/delta RSS, RSS anon/file breakdown, and Java/native heap. The after sample is taken only after getOfferings plus the existing ui_config/workflow readiness sequence completes, so this measures retained memory after workflow loading. It is intentionally not a peak-memory metric; RSS values are read from /proc/self/status and are reported in KiB. Unit tests, assembleDebug, and detekt passed. |
New
test-apps:perftesterapp to measure how longconfigure()+getOfferings()takes at startup, baseline vs workflows. It's the realistic counterpart to the instrumentation harness: a real app, a button press, timestamps around the two calls, one JSON line appended per press toresults.jsonlon device.Why an app and not just the instrumentation test: the harness runs in-process with mocked billing and a simulated lifecycle, so it can't show real process cold-start ordering. This can. The
had_*cache flags in each row say whether a sample was cold or warm, so run order doesn't have to be tracked separately.How it works:
DangerousSettings.forWorkflows().close()if configured (soconfigure()doesn't short-circuit on an equal config), snapshot the cache flags,configure(),getOfferings(), then on the workflows armui_config+ first workflow body readiness.-e autorun true -e workflows truedrives the same cycle for scriptedam startloops.A Test Store key is recommended (
PERF_TESTER_API_KEYinlocal.properties): products resolve through the simulated store, no Play setup, and billing is the same in both arms. No changes to:purchases.Known limitation: the render-readiness
withTimeoutcan't actually boundawaitGetWorkflow/awaitGetUiConfig, because those SDK APIs use non-cancellablesuspendCoroutine. A hung fetch on the workflows arm keeps the cycle waiting past the guard. ThegetOfferingsmeasurement itself is properly bounded. Left as-is for now, a proper fix needs a detached-async workaround.Verification