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

Package x.y.z must not be running prior to cold start! #221

Closed
nuhkoca opened this issue Apr 18, 2023 · 6 comments
Closed

Package x.y.z must not be running prior to cold start! #221

nuhkoca opened this issue Apr 18, 2023 · 6 comments
Assignees

Comments

@nuhkoca
Copy link

nuhkoca commented Apr 18, 2023

Hello,

I am trying to integrate Baseline Profiles but when I execute StartupBenchmark with COLD startup mode, it throws an exception

Package x.y.z must not be running prior to cold start!

Do you know why?

My config:

@RunWith(AndroidJUnit4::class)
class StartupBenchmark {

    @get:Rule
    val benchmarkRule = MacrobenchmarkRule()

    @Test
    fun startup() = benchmarkRule.measureRepeated(
        packageName = PACKAGE_NAME,
        metrics = listOf(StartupTimingMetric()),
        iterations = 5,
        startupMode = StartupMode.COLD
    ) {
        pressHome()
        startActivityAndWait()
    }
}
@nuhkoca
Copy link
Author

nuhkoca commented Apr 18, 2023

I noticed that this happens if iterations is greater than 3

@mlykotom
Copy link
Contributor

Could you give a bit more details on what device, OS version you encountered the error?

The error occurs because Macrobenchmark is not able to kill your app. But it does it in between iterations, so I don't know why changing the iterations would make a difference.

@nuhkoca
Copy link
Author

nuhkoca commented Apr 18, 2023

The device is Samsung S21 5G Android 13.

@mlykotom
Copy link
Contributor

@ChrisCraik Have we seen anything like that for any device? Or do you know what could be the cause of it?

@SubhrajyotiSen
Copy link
Contributor

Noticing this issue on Pixel 6a running Android 14 Beta 2 as well.

@mlykotom
Copy link
Contributor

mlykotom commented May 18, 2023

Could you pls file a bug directly to the library? This doesn't look like a bug with the sample https://issuetracker.google.com/issues/new?component=975669&template=1519452

Thank you! 🙏🏼

@keyboardsurfer keyboardsurfer closed this as not planned Won't fix, can't repro, duplicate, stale Jul 31, 2023
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

4 participants