fix: stabilize android perf harness setup#657
Conversation
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0ad552d92
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| serial: cfg.serial, | ||
| platformFlags: ['--platform', 'android'], | ||
| selectorFlags: ['--serial', serial, '--android-device-allowlist', serial], | ||
| selectorFlags: ['--device', avdName, ...serialFlags], |
There was a problem hiding this comment.
Don't add the default AVD when a serial was requested
When the perf run is invoked with only --serial and that Android device is not currently visible, this now also passes the implicit default --device Pixel_9_Pro_XL_API_37 into boot. The boot handler treats any --device as an AVD fallback and calls ensureAndroidEmulatorBooted; that helper uses serial only as a discovery filter, not as an emulator launch port, so it can start the default AVD and then wait up to the emulator boot timeout for the requested serial to appear. This makes serial-targeted CI/ad-hoc runs hang or fail against an unrelated default AVD instead of failing fast for the requested serial. Only include --device when the user supplied one, or when no --serial override is present.
Useful? React with 👍 / 👎.
|
Summary
Android perf runs now default to an AVD name that
bootcan launch instead of a hardcoded emulator serial, while still honoring explicit--serialselectors when provided.The perf harness also stops after failed setup measurements, so boot/open failures no longer cascade into misleading timed tour failures.
Validation
Verified with
pnpm check:quickandgit diff --check.