Status Update
Comments
bk...@gmail.com <bk...@gmail.com> #2
The workaround I found so far is to use project.afterEvaluate {} to access the build types, as they are created only after Baseline Profile Gradle Plugin creates them:
Kotlin
android {
buildTypes {
release { ... }
project.afterEvaluate {
getByName("benchmarkRelease") { }
getByName("nonMinifiedRelease") { }
}
}
}
Groovy
android {
buildTypes {
release { ... }
project.afterEvaluate {
benchmarkRelease { }
nonMinifiedRelease { }
}
}
}
This way there are no redundant build variants created.
dv...@gmail.com <dv...@gmail.com> #3
Attaching a sample project for convenience.
cc...@google.com <cc...@google.com> #5
I would say AS isn't the problem. Even without the AS in the project that I attached the simple commands:
./gradlew assembleBenchmarkBenchmarkRelease
./gradlew assembleNonMinifiedNonMinifiedRelease
./gradlew assembleNonMinifiedBenchmarkRelease
are executed successfully and produce some apks.
dv...@gmail.com <dv...@gmail.com> #6
This is how the baseline profile works - it creates specific build types to correctly generate baseline profiles and benchmarks.
You can still disable the variants if you're not interested in one of them. But AS should not be showing them (by default, configurable through a flag).
cc...@google.com <cc...@google.com> #7
Yes, the Baseline Profile Gradle Plugin creates the appropriate build types or updates them if they already exist (or supposed to, according to the source code).
What I'm refereing to exactly is those result build variants, that don't make sence: benchmarkBenchmarkRelease
, nonMinifiedNonMinifiedRelease
and nonMinifiedBenchmarkRelease
.
AS displays whatever build variants were created by the gradle plugins and fixing this issue either on AS side or disabling all these weird build variants manually in build script seem more like treating a symptom, rather than the root cause.
pr...@google.com <pr...@google.com> #8
AS does hide these variants, but the Android Gradle Plugin needs to be 8.6.0.alpha01
or higher. We use variant's experimental properties as a flag to hide these variants and 8.6.0.alpha01
is the AGP version our model recognizes those flags.
Could you try bumping the AGP version? The attached project uses 8.5.2.
Description
Component used: Macrobenchmark/FrameTimingMetric Version used: latest version Devices/Android versions reproduced on: android 13
I used Macrobenchmark to write a cold launching testcase .
I was collecting FrameTimingMetric by passing FrameTimingMetric in measureRepeated method.(please look screenshot I attach below). However I get the exception thrown by require statement.
I debugged the testcase, found that FrameId of Choreographer#doFrame is null.(please look screenshot I attach below)
because of the last substring divided by empty string of choreographer#doFrame is frame time ,not frameId.
could you fix that?
If this is a bug in the library, we would appreciate if you could attach: