Repository navigation
feat(samples): Make Nav3 sample app performance runs scriptable and measure the SDK cost - #6812
Merged
Merged
Conversation
A run needed UI automation through MainActivity, Integrations, Nav3 setup and the Performance tab, because Nav3Activity wasn't exported. Export it and read the preset, integration mode and run from intent extras, so runs can be scripted with adb shell am start and their results read from logcat. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rmance tab First draw lands on two 60 Hz frames, so it can't show the SDK's sub-frame cost. Time the SDK's synchronous back stack work directly, between effects placed before and after SentryNavEffect, and report its p50 and p90. Also measure 100 iterations instead of 20, report p90 for both sides of the A/B comparison, report live heap after a GC before and after each measured run, and show extractor averages below 1 us instead of truncating them to 0 us. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Changing the integration mode, extractor cost or argument shape kept the counters, so the panel mixed measurements from the old mode with the new one. Reset them, as a run already does before it measures. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…3 runs A burst of navigations fills the SDK's send queue, so the after-run heap reading mostly measured envelopes waiting to be sent, and dropped transactions went unreported. Count transactions dropped for queue overflow through onDiscard, then flush and read the heap again after each measured run. In an A/B run, the flush also gives the second side an empty queue. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
PR risk: mediumFor commit The model rated this change low. It was raised to medium because:
This label is a hint for reviewers, not an approval. |
Contributor
|
📲 Install BuildsAndroid
|
0xadam-brown
marked this pull request as ready for review
November 30, 2026 10:38
0xadam-brown
requested review from
romtsn and
runningcode
and removed request for
a team
November 30, 2026 10:38
runningcode
approved these changes
Nov 30, 2026
0xadam-brown
enabled auto-merge (squash)
November 30, 2026 11:21
…is cancelled Leaving the Performance tab while an adb-requested preset warms up cancels the preset, but the launch code still started the run, on whichever scenario was open. prepareNav3PerformancePreset now returns whether it finished, and the launch code stops if it didn't. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Selecting the Performance tab during a run reset its back stack and counters but let the run continue, so the run finished with partial measurements. Stop the run whenever a scenario is selected, as other tabs already did. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Improves the Nav3 sample's Performance tab so its runs can be scripted and more clearly display where CPU cycles and memory are being allocated. For instance, now we can:
To start runs from adb, use:
💡 Motivation and Context
Prior to this PR, the "Performance" tab didn't show where the SDK's time and memory allocations went. Now we can see what's happening.
💚 How did you test it?
Example A/B result:
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
🤖 Generated with Claude Code
#skip-changelog