Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: android/compose-samples
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: android/compose-samples
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: performance-improvements
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 13 files changed
  • 1 contributor

Commits on Jul 16, 2025

  1. [Jetcaster] feat: Add Baseline Profile generation and benchmarking

    This commit introduces Baseline Profile generation and macrobenchmarking capabilities to the Jetcaster sample.
    
    Key changes:
    
    *   **New `benchmark` module:** A new `:mobile:benchmark` module has been added to house Baseline Profile generation and macrobenchmark tests.
    *   **Dependencies:**
        *   Added `androidx.benchmark:benchmark-macro-junit4` for macrobenchmarking.
        *   Added `com.android.test` plugin for the benchmark module.
    *   **Baseline Profile Generation:**
        *   `StartupBaselineProfile.kt` defines a `BaselineProfileRule` to collect profiles during a typical startup and scroll scenario on the home screen.
        *   `HOME_CONTENT_GRID_TAG` test tag added to the main content grid in `Home.kt` for reliable UI Automator interaction.
    *   **Startup Benchmarks:**
        *   `StartupBenchmark.kt` includes tests to measure cold startup performance with different compilation modes: `None`, `Partial` (with Baseline Profile), and `Full`.
        *   Custom metrics `BaselineProfileMetrics.kt` are introduced to track JIT compilation time and class initialization time, which are expected to decrease with effective Baseline Profiles.
    *   **Helper Utilities:**
        *   `Util.kt` in the benchmark module provides helper functions for UI Automator interactions, like waiting for elements and dumping the window hierarchy.
    *   **Configuration Updates:**
        *   `settings.gradle.kts` now includes the `:mobile:benchmark` module.
        *   The root `build.gradle.kts` registers the `com.android.test` plugin.
        *   `Jetcaster/mobile/build.gradle.kts` enables `isShrinkResources = true` for release builds.
        *   `JetcasterApp.kt` enables `testTagsAsResourceId` for UI testing.
    AjeshRPai committed Jul 16, 2025
    Configuration menu
    Copy the full SHA
    3eba553 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    227da51 View commit details
    Browse the repository at this point in the history
Loading