iris-android-app: a bench feature, P0's iris half
A third AndroidAppState (BenchClient) on top of transcript-screen: embeds app/bench-fixture/assets/transcript.jsonl with include_str! (no server, no enrollment), folds the first 3,200 lines through client_core's real fold_page as the opening backlog, and holds the rest back as a streaming tail. "Run benchmark" resets FrameReport, animates the same 24-swipe/ 6-cycle scroll BenchRun.kt drives (List::scroll in ~60Hz steps, since iris has no built-in tween), then replays the tail at 20/s through fold_event -- the same fold path a live SSE reply takes -- and shows a report in a selectable TextEdit. "Copy report" puts it on the clipboard. The report adds process CPU time (libc::getrusage), peak RSS (/proc/self/ status's VmHWM) and battery current (BatteryManager.getIntProperty via direct JNI, bench_jni.rs's PlatformHandle) to FrameStats's existing frames/janky%/percentiles/CPU-GPU-split line -- "unavailable" rather than a fabricated number wherever the platform can't answer. build.rs now exits early under the bench feature before requiring a live server's host/port/token/CA: BenchClient never calls build_transport(). app/build.gradle gains a signed `release` build type (previously only debug) so the cdylib cargo ndk builds can be packaged for a phone, the same key app/build-apk.sh generates. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
8d23a20792
commit
683db4908a
7 files changed
+637
-2
No files matched your search
@@ -19,9 +19,39 @@ android {
|
||||
versionName = "1.0"
|
||||
}
|
||||
|
||||
// A release build must be signed, and the key is per machine rather than per repo -- same
|
||||
// reasoning and the same key as `app/build-apk.sh` (the Compose app): it is what a phone
|
||||
// recognises the app by, and a secret never lives in a checkout (the mount is shared with an
|
||||
// untrusted VM). `build-apk.sh` generates this key once and points at it through the
|
||||
// environment; without it a release build here is unsigned, which is fine for everything
|
||||
// except installing.
|
||||
def keystore = System.getenv("AI_APP_KEYSTORE")
|
||||
signingConfigs {
|
||||
if (keystore != null) {
|
||||
release {
|
||||
storeFile = file(keystore)
|
||||
storePassword = System.getenv("AI_APP_KEYSTORE_PASSWORD")
|
||||
keyAlias = "ai-app"
|
||||
keyPassword = storePassword
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
}
|
||||
// P0's iris half (docs/RUST.md's P0 box): the build a phone actually runs. The `.so`
|
||||
// itself is built separately with `cargo ndk --release --features "transcript-screen
|
||||
// force-gles bench"` straight into src/main/jniLibs/ (this crate's own Cargo.toml) --
|
||||
// Gradle here only packages and signs whatever is already there, the same division as the
|
||||
// debug/tabs-screen build this project started with. `applicationIdSuffix` keeps it
|
||||
// installable beside a debug build of the tabs demo rather than replacing it.
|
||||
release {
|
||||
applicationIdSuffix ".bench"
|
||||
if (keystore != null) {
|
||||
signingConfig = signingConfigs.release
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
|
||||
Reference in new issue
Block a user