mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 20:48:43 +00:00
Only setup mock data once for baseline profiles and benchmarks.
This commit is contained in:
@@ -26,10 +26,12 @@ class BaselineProfileGenerator {
|
||||
fun startup() = baselineProfileRule.collectBaselineProfile(
|
||||
packageName = "org.thoughtcrime.securesms",
|
||||
profileBlock = {
|
||||
val setupIntent = Intent().apply {
|
||||
component = ComponentName("org.thoughtcrime.securesms", "org.signal.benchmark.BenchmarkSetupActivity")
|
||||
if (iteration == 0) {
|
||||
val setupIntent = Intent().apply {
|
||||
component = ComponentName("org.thoughtcrime.securesms", "org.signal.benchmark.BenchmarkSetupActivity")
|
||||
}
|
||||
startActivityAndWait(setupIntent)
|
||||
}
|
||||
startActivityAndWait(setupIntent)
|
||||
startActivityAndWait()
|
||||
device.findObject(By.textContains("Buddy")).click();
|
||||
device.wait(
|
||||
|
||||
@@ -52,7 +52,11 @@ class StartupBenchmarks {
|
||||
iterations = iterations,
|
||||
startupMode = StartupMode.COLD,
|
||||
compilationMode = compilationMode,
|
||||
setupBlock = fakeDataSetupBlock
|
||||
setupBlock = {
|
||||
if (compilationMode !is CompilationMode.Partial || iteration == 0) {
|
||||
fakeDataSetupBlock()
|
||||
}
|
||||
}
|
||||
) {
|
||||
pressHome()
|
||||
startActivityAndWait()
|
||||
|
||||
Reference in New Issue
Block a user