Skip to content

Commit 2759fbc

Browse files
committed
feat: expand baseline profile with keyboard typing journey
BaselineProfileGenerator now exercises the full IME hot path: enable IME, launch benchmark input activity, type two phrases to trigger dictionary lookup, SymSpell, and suggestion strip recomposition. ART's profile-guided compilation will now cover FlorisImeService startup, KeyboardManager dispatch, NlpManager suggest, and CandidatesRow rendering. Also removes stale TODO about merging LanguagePackManagerScreen with ThemeManagerScreen — the screens have diverged (CRUD lifecycle vs pure selection) and no longer share enough to benefit from a shared abstraction.
1 parent 77c3d02 commit 2759fbc

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

app/src/main/kotlin/dev/patrickgold/florisboard/app/settings/localization/LanguagePackManagerScreen.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ enum class LanguagePackManagerScreenAction(val id: String) {
7373
MANAGE("manage-installed-language-packs");
7474
}
7575

76-
// TODO: this file is based on ThemeManagerScreen.kt and can arguably be merged.
7776
@OptIn(ExperimentalJetPrefDatastoreUi::class)
7877
@Composable
7978
fun LanguagePackManagerScreen(action: LanguagePackManagerScreenAction?) = FlorisScreen {

benchmark/src/main/kotlin/dev/patrickgold/florisboard/benchmark/BaselineProfileGenerator.kt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,20 @@ class BaselineProfileGenerator {
3131
fun startup() =
3232
baselineProfileRule.collect(packageName = TargetPackageName) {
3333
pressHome()
34-
// This block defines the app's critical user journey. Here we are interested in
35-
// optimizing for app startup. But you can also navigate and scroll
36-
// through your most important UI.
3734
startSettingsActivityAndWait()
3835
device.waitForIdle()
3936
}
37+
38+
@Test
39+
fun keyboardTypingJourney() =
40+
baselineProfileRule.collect(packageName = TargetPackageName) {
41+
pressHome()
42+
selectTargetIme()
43+
startBenchmarkInputActivityAndWait()
44+
device.waitForIdle(2_000)
45+
device.executeShellCommand("input text 'hello world this is a test'")
46+
device.waitForIdle(2_000)
47+
device.executeShellCommand("input text ' the quick brown fox'")
48+
device.waitForIdle(1_000)
49+
}
4050
}

0 commit comments

Comments
 (0)