You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
or [performance-poetry](performance-poetry/complex-benchmark/src/main/java/com/squareup/benchmarks/performance/poetry/complex/benchmark/ComplexPoetryGatherBaseline.kt)
16
+
to gather profiles. Performance Poetry has more adaptability and better benchmarks at this time, so
17
+
focus on that.
7
18
8
-
This is for the /samples/dungeon/app. This includes a macrobenchmark
val isPlayerEaten:Boolean get() =false// Never Eaten!
52
+
```
53
+
54
+
The [benchmark](dungeon-benchmark/src/main/java/com/squareup/sample/dungeon/benchmark/DungeonStartupBenchmark.kt)
33
55
is used to verify the results of including the baseline profiles on the startup time. This runs the
34
56
same scenario with and without forcing the use of the profiles. To force the use of profiles, the
35
57
`libs.androidx.profileinstaller` dependency is included into the app under profile (dungeon in this
@@ -41,11 +63,38 @@ Module of code for performance testing related to poetry applications.
41
63
42
64
### complex-poetry
43
65
44
-
This application is a modification of the samples/containers/app-poetry app which uses also the
66
+
This application is a modified version of the samples/containers/app-poetry app which also uses the
45
67
common components in samples/containers/common and samples/containers/poetry. It modifies this
46
68
application to pass the Workflow
47
-
a [SimulatedPerfConfig](performance-poetry/complex-poetry/src/main/java/com/squareup/benchmarks/performance/poetry/SimulatedPerfConfig.kt).
69
+
a [SimulatedPerfConfig.](performance-poetry/complex-poetry/src/main/java/com/squareup/benchmarks/performance/complex/poetry/instrumentation/SimulatedPerfConfig.kt)
48
70
49
71
In this case we specify that the app should be more 'complex' which adds delays into each of the
50
72
selections that are run by Worker's which then trigger a loading state that is handled by the
One benchmark that is included (and run in CI) as a UI test is the [RenderPassTest.](performance-poetry/complex-poetry/src/androidTest/java/com/squareup/benchmarks/performance/complex/poetry/RenderPassTest.kt)
76
+
This measures two things:
77
+
78
+
1. The number of "Render Passes" that the Raven scenario triggers.
79
+
1. The ratio of 'fresh renderings' to 'stale renderings' in the Raven scenario.
80
+
81
+
A rendering is 'fresh' if the node's state has changed. A rendering is 'stale' if its state is the
82
+
same. Note that Workflow is designed to to have cheap, idempotent renderings and the fresh rendering
83
+
ratio will never be 1.0 by design. However, if there are smells that have led to 'render churn' one
84
+
will see a very poor rendering ratio and we would like a way to track that and to test that it is
85
+
constant (or improving!).
86
+
87
+
This module includes an [instrumentation package](performance-poetry/complex-poetry/src/main/java/com/squareup/benchmarks/performance/complex/poetry/instrumentation)
88
+
that has two [WorkflowInterceptor]s that can count render passes or instrument perfetto Trace
89
+
sections, as well as data class for tracking those.
90
+
91
+
This module also includes a [robots package](performance-poetry/complex-poetry/src/main/java/com/squareup/benchmarks/performance/complex/poetry/robots)
92
+
that provides some utility helper 'robots' for the UiAutomator [androidx.test.uiautomator.UiDevice]
93
+
as well as scenarios specific to this Complex Poetry application.
94
+
95
+
### complex-benchmark
96
+
97
+
This is an Android Test module which hosts an application that can run androidx.macrobenchmarks.
98
+
See the kdoc on [ComplexPoetryBenchmarks.](performance-poetry/complex-benchmark/src/main/java/com/squareup/benchmarks/performance/complex/poetry/benchmark/ComplexPoetryBenchmarks.kt)
99
+
100
+
The results for this are stored in the same folder at [ComplexPoetryResults.txt.](performance-poetry/complex-benchmark/src/main/java/com/squareup/benchmarks/performance/complex/poetry/benchmark/ComplexPoetryResults.txt)
Copy file name to clipboardExpand all lines: benchmarks/dungeon-benchmark/src/main/java/com/squareup/sample/dungeon/benchmark/DungeonGatherBaselineProfile.kt
Copy file name to clipboardExpand all lines: benchmarks/dungeon-benchmark/src/main/java/com/squareup/sample/dungeon/benchmark/DungeonStartupBenchmark.kt
0 commit comments