Questions tagged [macrobenchmark]
19 questions
4
votes
0 answers
Baseline Profiles fail at profile generation with Shell.isSessionRooted
I am trying to integrate the newly introduced baseline profiles into our app. I am using the following simple snippet to generate a baseline profile.
@RunWith(AndroidJUnit4::class)
class BaseProfileGenerator {
@get:Rule
val baselineProfile…

r4dicalbuRn
- 55
- 7
4
votes
2 answers
Is safe in the production build?
For using macrobenchmark, we need to add to AndroidManifest.
Is it safe to include in the production build?

STAR_ZERO
- 1,400
- 11
- 21
3
votes
0 answers
Macrobenchmark is failing due to null result in Google sample
I am trying to learn Jetpack benchmark. By reviewing this google sample : https://github.com/android/performance-samples/tree/main/MacrobenchmarkSample
One of classes includes following method :
private fun MacrobenchmarkScope.clickOnId(resourceId:…

Ali
- 9,800
- 19
- 72
- 152
2
votes
0 answers
Unable to copy baseline profile output from device
I'm trying to generate a baseline profile for my app but I'm seeing the following errors:
:benchmark:connectedReleaseAndroidTest
java.io.FileNotFoundException: META-INF/native/libnetty_tcnative_osx_aarch_64.jnilib
java.io.FileNotFoundException:…

jpetitto
- 331
- 4
- 15
2
votes
1 answer
Android Macrobenchmark module doesn't recognise 'com.android.test' plugin
I'm trying to put the MacroBenchmark library in my project, but I'm getting an error to apply com.android.test the plugin. This error happens while syncing Gradle.
I've added the plugin root gradle using the same AGP version (7.3.1). I'm also using…

Artur Schaefer
- 31
- 6
1
vote
0 answers
Android MacroBenchmark: FrameTimingMetric test is running only for 1 iteration
I am trying to perform a scroll test on a recycler view using FrameTimingMetric for 5 iterations.
My AppStartup Test using StartupTimingMetric() is working fine and generating results for all 5 iterations.
For scroll test using FrameTimingMetric, it…

Bhavesh Aggarwal
- 11
- 2
1
vote
0 answers
No Baseline profile found in target apk
I am trying to use baseline profile generated and run benchmark test. Despite copying baseline profile, I am still facing issues. I copied it in all variant folders just to make sure its not missed, still getting file not found…

Manoj MM
- 480
- 1
- 5
- 15
1
vote
1 answer
Why specific activity can't start while doing MacroBenchmark in Android?
I have written a benchmark method to get benchmark report on specific activity. My plan is to first do this portion properly. And then adding other operation like clicking on a button and test how frame timing metric works. As I have converted code…

Ashif Mujtoba
- 46
- 4
1
vote
1 answer
baseline-prof.txt location for each build variant
My app has multiple flavor dimensions and so I want to create baseline-prof.txt for each variant (e.g. fooBar). However, when I place the file in /app/src/fooBar it is not picked up during the release build. The only time it is picked up is when…

Mark
- 7,446
- 5
- 55
- 75
1
vote
1 answer
Baseline Profiles - Metrics are not consistent
I'm implementing the Baseline profile in an app and when I run my macrobenchmark tests, the results are not consistent. Not always the results are optimized using the baselineprofile.txt.
I'm running the macrobenchmark test in an emulator with this…

Carlos Lopez
- 133
- 4
1
vote
1 answer
Baseline profile is not avaliable on Android S
I generate a baseline profile according to guidance of baseline profile and want to install my app on Android S devices without Google Play. I found the baseline profile is not available. dump the info of baseline profile by profman command and it…

TIAN
- 11
- 2
0
votes
0 answers
How to ignore failed test in Android macrobenchmark
I create some macrobenchmark test on Android. And refer to the Android documentation, i can run all the benchmark tests using single gradle command below:
./gradlew :macrobenchmark:connectedCheck
However, some tests are FAILED and stop the…

fanjavaid
- 1,676
- 8
- 34
- 65
0
votes
0 answers
The baseline profile install broadcast was not received. This most likely means that the profileinstaller library is missing from the target apk
Getting this error while running startup baseline benchmarks, according to the error I need to add this dependency in my build.gradle of main android module and it is already added…

Sagar Khurana
- 184
- 1
- 2
- 11
0
votes
1 answer
Android Baseline Profiles - No difference in App Startup Time (StartupTimingMetric)
This is my Macrobenchmark test to measure StartupTimingMetric
@RunWith(AndroidJUnit4::class)
@LargeTest
class Startup {
@get:Rule
val rule = MacrobenchmarkRule()
@Test
fun measureScrollWithoutBaseline() {
…

Veeresh Charantimath
- 4,641
- 5
- 27
- 36
0
votes
0 answers
Android - Error when running benchmarks on Amazon Firetablets (using Jetpack Macrobenchmark)
The benchmark runs correctly, but in the final stage, when it was supossed to generate .json and .trace, it throws an exception.
java.lang.IllegalArgumentException: Unable to read any metrics during benchmark (metric list:…

Matheus Correa
- 21
- 1
- 3