Skip to content

Commit fa582d5

Browse files
committed
Deletes waitForLoading() from PoetryRobots.
* When I merged `ray/ui-update` into `main`, I broke `renderPassCounterComplexNoInitializingState` and `renderPassCounterComplexWithInitializingState`. * This is because I deleted the l`oading_dialog` id that LoadingDialogSelector` looks for * I deleted that because I deleted `LoaderContainer`, now redundant with `BodyAndModalsContainer` * It once said: ```kotlin viewConstructor = { initialRendering, initialEnv, contextForNewView, _ -> LoaderContainer(contextForNewView).apply { id = R.id.loading_dialog layoutParams = ViewGroup.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT ) bindShowRendering(initialRendering, initialEnv, ::update) } ``` * But that id would always be visible, as it applied to the LoaderContainer frame itself, not the loading dialog it may or may not be showing. So I'm deleting the pointless `waitForLoading()` function, and now everything passes. Also note a change to one of the benchmark baselines: ``` java.lang.AssertionError: Congrats! You have improved the the number of Render Passes (lower better) by 4 (6.56%) in the 'Raven navigation with initializing state scenario'! Please update the expected value for your config. The value is now 57. at org.junit.Assert.fail(Assert.java:89)connectedDebugAndroidTest ``` ``` java.lang.AssertionError: Hmmm. The the fresh rendering ratio (higher better) has improved nullin the 'Raven navigation with initializing state scenario', but only because the scenario has changed, impacting expectation but not for the better. The value is now (ratio: 0.119; fresh renderings: 83; stale renderings: 615). Please update the test. ```
1 parent 8796ed4 commit fa582d5

File tree

2 files changed

+3
-15
lines changed
  • benchmarks/performance-poetry/complex-poetry/src
    • androidTest/java/com/squareup/benchmarks/performance/complex/poetry
    • main/java/com/squareup/benchmarks/performance/complex/poetry/robots

2 files changed

+3
-15
lines changed

benchmarks/performance-poetry/complex-poetry/src/androidTest/java/com/squareup/benchmarks/performance/complex/poetry/RenderPassTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ class RenderPassTest {
139139
useInitializingState = true,
140140
complexityDelay = 100L
141141
),
142-
expectedPasses = 61,
143-
expectedFreshRenderings = 88,
144-
expectedStaleRenderings = 652
142+
expectedPasses = 57,
143+
expectedFreshRenderings = 83,
144+
expectedStaleRenderings = 615
145145
)
146146

147147
val COMPLEX_NO_INITIALIZING = Scenario(

benchmarks/performance-poetry/complex-poetry/src/main/java/com/squareup/benchmarks/performance/complex/poetry/robots/PoetryRobots.kt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,17 @@ fun UiDevice.waitForPoetry(timeout: Long = DEFAULT_UI_AUTOMATOR_TIMEOUT) {
1717
wait(Until.hasObject(PoetryPackageSelector), timeout)
1818
}
1919

20-
fun UiDevice.waitForLoading(timeout: Long = DEFAULT_UI_AUTOMATOR_TIMEOUT) {
21-
waitFor(LoadingDialogSelector, timeout)
22-
}
23-
2420
fun UiDevice.next(timeout: Long = DEFAULT_UI_AUTOMATOR_TIMEOUT) {
2521
waitForAndClick(NextSelector, timeout)
26-
waitForLoading(timeout)
2722
}
2823

2924
fun UiDevice.previous(timeout: Long = DEFAULT_UI_AUTOMATOR_TIMEOUT) {
3025
waitForAndClick(PreviousSelector, timeout)
31-
waitForLoading(timeout)
3226
}
3327

3428
fun UiDevice.openRavenAndNavigate() {
3529
waitForAndClick(RavenPoemSelector)
36-
waitForLoading()
37-
3830
waitForAndClick(By.textStartsWith("Deep into that darkness peering"))
39-
waitForLoading()
4031

4132
repeat(5) {
4233
next()
@@ -47,8 +38,5 @@ fun UiDevice.openRavenAndNavigate() {
4738
}
4839

4940
this.pressBack()
50-
51-
waitForLoading()
52-
5341
waitFor(RavenPoemSelector)
5442
}

0 commit comments

Comments
 (0)