android / codelab-android-performance

Apache License 2.0
21 stars 10 forks source link

I Can't create a baseline profile for a physical device #18

Open gerardoeg opened 9 months ago

gerardoeg commented 9 months ago
  1. move to end branch.
  2. enable useConnectedDevices = true on build.gradle.kts of baselineprofile module
    
    baselineProfile {
    managedDevices += "pixel6Api31"
    useConnectedDevices = true
    }
3. run: 

./gradlew :app:generateReleaseBaselineProfile -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile

Error: 

com.google.baselineprofile.BaselineProfileGenerator > generate[Pixel 5 - 14] FAILED java.lang.IllegalStateException: Expected no stdout/stderr from pm dump-profiles --dump-classes-and-methods com.example.baselineprofiles_codelab, saw Output(stdout=Profile saved to '/data/misc/profman/com.example.baselineprofiles_codelab-primary.prof.txt' , stderr=)


Full Log: 

./gradlew :app:generateReleaseBaselineProfile -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile Configuration on demand is an incubating feature.

Configure project :app Passing custom test runner argument android.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules from gradle.properties or command line is not compatible with configuration caching. Please specify this argument using android gradle dsl.

Task :baselineprofile:connectedNonMinifiedReleaseAndroidTest Starting 5 tests on Pixel 5 - 14

com.google.baselineprofile.BaselineProfileGenerator > generate[Pixel 5 - 14] FAILED java.lang.IllegalStateException: Expected no stdout/stderr from pm dump-profiles --dump-classes-and-methods com.example.baselineprofiles_codelab, saw Output(stdout=Profile saved to '/data/misc/profman/com.example.baselineprofiles_codelab-primary.prof.txt' , stderr=)

com.google.baselineprofile.ScrollBenchmarks > scrollCompilationBaselineProfiles[Pixel 5 - 14] SKIPPED

com.google.baselineprofile.ScrollBenchmarks > scrollCompilationNone[Pixel 5 - 14] SKIPPED

com.google.baselineprofile.StartupBenchmarks > startupCompilationBaselineProfiles[Pixel 5 - 14] SKIPPED

com.google.baselineprofile.StartupBenchmarks > startupCompilationNone[Pixel 5 - 14] SKIPPED Tests on Pixel 5 - 14 failed: There was 1 failure(s).

Task :baselineprofile:connectedNonMinifiedReleaseAndroidTest FAILED

FAILURE: Build failed with an exception.

BUILD FAILED in 1m 19s 65 actionable tasks: 3 executed, 62 up-to-date



Device: Pixel 5 - Android 14.