Skip to content

Commit

Permalink
refactor(baselineprofile): update baseline and startup prof files.
Browse files Browse the repository at this point in the history
  • Loading branch information
GerardPaligot committed Apr 29, 2024
1 parent e5b13c7 commit 37f956c
Show file tree
Hide file tree
Showing 6 changed files with 18,361 additions and 23,177 deletions.
20,762 changes: 9,175 additions & 11,587 deletions androidApp/src/release/generated/baselineProfiles/baseline-prof.txt

Large diffs are not rendered by default.

20,762 changes: 9,175 additions & 11,587 deletions androidApp/src/release/generated/baselineProfiles/startup-prof.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class BaselineProfileGenerator {
packageName = InstrumentationRegistry.getArguments().getString("targetAppId")
?: throw Exception("targetAppId not passed as instrumentation runner arg"),
// See: https://d.android.com/topic/performance/baselineprofiles/dex-layout-optimizations
includeInStartupProfile = true
includeInStartupProfile = true,
maxIterations = 1
) {
val eventListPom = EventListPOM(device)
val agendaPom = AgendaPOM(device)
Expand All @@ -68,6 +69,7 @@ class BaselineProfileGenerator {
}

with(agendaPom) {
waitDataFetched()
open()
openFilters()
back()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ package org.gdglille.devfest.baselineprofile.scenarios

import androidx.test.uiautomator.Direction
import androidx.test.uiautomator.UiDevice
import kotlin.time.Duration.Companion.seconds
import org.gdglille.devfest.baselineprofile.runAction
import org.gdglille.devfest.baselineprofile.waitForObject

class AgendaPOM(private val device: UiDevice) {
fun waitDataFetched() {
device.waitForObject(DevfestScenario.Partners.tabName, 20.seconds)
}

fun open() {
device.runAction(DevfestScenario.Agenda.tabName) { click() }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ object DevfestScenario {
}
object Partners {
val tabName = By.desc("Partners")
val detailName = By.text("Partner detail")
val first = By.desc("SFEIR")
val detailTitle = By.text("Partner detail")
val list = By.res(PartnersSemantics.list)
}
object Info {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PartnersPOM(private val device: UiDevice) {

fun openFirstItem() {
device.runAction(DevfestScenario.Partners.first) { click() }
device.waitForObject(DevfestScenario.Partners.detailName)
device.waitForObject(DevfestScenario.Partners.detailTitle)
}

fun scrollUpDown() {
Expand Down

0 comments on commit 37f956c

Please sign in to comment.