Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing tests in the Macrobenchmark sample #268

Open
StylingAndroid opened this issue Jan 12, 2024 · 0 comments
Open

Failing tests in the Macrobenchmark sample #268

StylingAndroid opened this issue Jan 12, 2024 · 0 comments
Assignees

Comments

@StylingAndroid
Copy link

StylingAndroid commented Jan 12, 2024

I am trying to run the benchmarks on the Macrobenchmark sample and some of the tests are failing. I am using the unaltered HEAD of the main branch, and executing ./gradlew :macrobenchmark:connectedBenchmarkReleaseAndroidTest. All of the tests in ClickLatencyBenchmark are failing with a similar error:

java.lang.IllegalArgumentException: Unable to read any metrics during benchmark (metric list: [androidx.benchmark.macro.TraceSectionMetric@390ebd6]).
Check that you're performing the operations to be measured. For example, if
using StartupTimingMetric, are you starting an activity for the specified package
in the measure block?
at androidx.benchmark.macro.MacrobenchmarkKt.macrobenchmark(Macrobenchmark.kt:342)
at androidx.benchmark.macro.MacrobenchmarkKt.macrobenchmarkWithStartupMode(Macrobenchmark.kt:422)
at androidx.benchmark.macro.junit4.MacrobenchmarkRule.measureRepeated(MacrobenchmarkRule.kt:107)
at com.example.macrobenchmark.benchmark.clickslatency.ClickLatencyBenchmark.composeLazyColumnClick(ClickLatencyBenchmark.kt:95)

All of the other tests are working fine.

This is on a Pixel 6 Pro running Android 14.

I have tried this on multiple computers, and used multiple different test devices, but always get the same failures.

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

No branches or pull requests

3 participants