Skip to content

Migrate snippet: more performance - #1097

Open
pengzhi-cb wants to merge 7 commits into
android:mainfrom
StellarElements:katherinekuan/performance-snippets
Open

pengzhi-cb wants to merge 7 commits into
android:mainfrom
StellarElements:katherinekuan/performance-snippets

Conversation

@pengzhi-cb

Copy link
Copy Markdown
Contributor

This PR aims to add the following hard-coded snippets from DAC to repo:
(1 snippet) https://developer.android.com/topic/performance/baselineprofiles/measure-baselineprofile
(1 snippet) https://developer.android.com/topic/performance/baselineprofiles/overview
(1 snippet) https://developer.android.com/topic/performance/benchmarking/macrobenchmark-overview
(1 snippet) https://developer.android.com/topic/performance/jankstats
(1 snippet) https://developer.android.com/topic/performance/startupprofiles/dex-layout-optimizations
(1 snippet) https://developer.android.com/topic/performance/vitals/launch-time

Summary:

  1. Updated androidx-benchmark to 1.4.1 and androidx-uiautomator to 2.4.0
  2. Moved benchmarking and startup profile generator tests from production source sets (src/main) to the correct test source sets (src/androidTest).
  3. Refactored MeasureBaselineProfile.kt and  BaselineProfilesOverview.kt to use the official UI Automator 2.4.0 DSL, removed mock helper classes.

kkuan2011 and others added 5 commits September 14, 2026 13:18
…nitialization crashes

- Upgrade androidx-benchmark to 1.4.1 and androidx-uiautomator to 2.4.0.
- Relocate benchmarking tests from production source (src/main) to the test source set (src/androidTest).
- Fix startup crash by making `SplitInitializer` a static inner class in `ActivityEmbeddingJavaSnippets.java`.
- Update `AndroidManifest.xml` to correctly reference nested initializer classes using the `$` separator.
- Adopt the new UI Automator 2.4.0 in `BaselineProfilesOverview.kt`.
- Consolidate and clean up testing dependencies in `misc/build.gradle.kts`.
- Reorganize UI Automator library declaration in `libs.versions.toml` for better consistency.
- Remove static modifier from ActivityEmbeddingJavaSnippets.SplitInitializer
- Fix AndroidManifest App Startup meta-data inner class reference paths
- Update androidx-metrics to 1.0.0
@pengzhi-cb
pengzhi-cb requested a review from a team as a code owner September 14, 2026 18:17
@snippet-bot

snippet-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 5 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@pengzhi-cb pengzhi-cb changed the title Katherinekuan/performance snippets Migrate snippet: more performance Sep 15, 2026
@pengzhi-cb
pengzhi-cb force-pushed the katherinekuan/performance-snippets branch from d5d4716 to 78e4622 Compare September 15, 2026 20:28
@kkuan2011

Copy link
Copy Markdown
Contributor

Is it possible to remove the new snippets from the misc folder? (We don't want to add any new snippets to that module). Can they go into the performance module, or do they need to go in the performance-samples repo?

@pengzhi-cb

Copy link
Copy Markdown
Contributor Author

Is it possible to remove the new snippets from the misc folder? (We don't want to add any new snippets to that module). Can they go into the performance module, or do they need to go in the performance-samples repo?

Oops, I did move them but the commit was lost when I move things into performance module. They are now in the proper module 2f42210

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants