Skip to content

Add CI and SLAs#22

Open
kiryldz wants to merge 10 commits into
mainfrom
kdz-macrobenchmark-ci
Open

Add CI and SLAs#22
kiryldz wants to merge 10 commits into
mainfrom
kdz-macrobenchmark-ci

Conversation

@kiryldz
Copy link
Copy Markdown
Owner

@kiryldz kiryldz commented May 27, 2026

No description provided.

@kiryldz kiryldz self-assigned this May 27, 2026
kiryldz and others added 5 commits May 27, 2026 12:43
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…enchmark

beforeVariants with buildType check may silently disable the com.android.test
variant. The find step reveals actual APK paths on the next run.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
AGP 8.5.1 assembleRelease leaves APKs in build/intermediates/apk/release/
rather than build/outputs/apk/release/. Stage them with find+cp so the
upload path is always a single known file and gcloud --app/--test refs hold.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Multiline backslash continuation caused gcloud to treat each env var as
a separate CLI argument. Single-quoted string fixes the parsing. pipefail
ensures gcloud failures propagate through the tee pipe.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
The macrobenchmark module was a JUnit shell whose only function was to let
FTL invoke perfetto; its TraceSectionMetric output (avg/min/max only) was
discarded anyway since scripts/aggregate-traces.py re-parses the raw traces
for p50/p90/p99. Replace it with a ~60-line FrameLatencyCapture
instrumentation test in :app/androidTest that drives CameraActivity and
shells out perfetto via UiAutomation, mirroring scripts/measure-frame-latency.sh.

One fewer Gradle module, no AndroidX Macrobenchmark dependency, identical
.pftrace output feeding the existing aggregate-and-gate pipeline.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kiryldz kiryldz force-pushed the kdz-macrobenchmark-ci branch from 8470bd8 to 21209fa Compare May 27, 2026 19:18
kiryldz and others added 4 commits May 27, 2026 23:17
perfetto's short-form CLI (-t, -a, positional categories) requires API 31+.
FTL only stocks redfin (Pixel 5 / Adreno 620) on Android 11 (API 30), so
swap the Adreno job to a52sxq (Galaxy A52s, Adreno 642L) on Android 14 —
the next-closest mid-range Snapdragon device available. Bump the Mali job
from oriole-32 → oriole-33 (same Pixel 6 hardware, Android 13) for the
same reason.

While diagnosing the previous CI run on FTL, the Pixel 6 hit a real NPE in
CoreEngine::nativeSendCameraFrame: AHardwareBuffer_lock returned non-zero
for the camera-side buffer, leaving cpuData null, and the subsequent
memcpy SIGSEGV'd. Check both lock return codes + pointer non-null before
copying, and drop the frame on failure instead of crashing.

Also add an `ls` assertion after each perfetto capture in
FrameLatencyCapture — UiAutomation.executeShellCommand swallows exit codes
and stderr, so a misbehaving perfetto used to silently pass the test with
zero traces produced. The assertion gives us a clear failure with the
output-dir listing in the message.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The FTL run finally produced .pftrace files but the workflow couldn't find
them: --directories-to-pull preserves the full on-device path under the
GCS artifacts/ prefix, so /sdcard/Android/media/<pkg>/additional_test_output
lands at .../artifacts/sdcard/Android/media/<pkg>/additional_test_output,
not .../artifacts/additional_test_output. Update the gsutil cp URL and
drop the rsync fallback (it was masking this exact bug).

Then on Mali (Pixel 6), every frame was dropped: AHardwareBuffer_lock
returned 0 (success) but with a NULL pointer for the GPU buffer side. The
buffer was allocated with only GPU_SAMPLED_IMAGE | GPU_FRAMEBUFFER —
strict drivers refuse to CPU-map a buffer not allocated CPU-writable and
signal that by returning success+null. Add CPU_WRITE_OFTEN to the
allocation. Adreno was lenient and worked without it; Mali is strict.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
gsutil cp -r refuses to copy multiple files into a non-existent destination
("Destination URL must name a directory, bucket, or bucket subdirectory")
even when the dest ends with /. Pre-create the dir with mkdir -p.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
compare-baseline.py guards against silent FTL pool swaps by exiting 3 on
ftl_model_id mismatch; the adreno baseline still claimed redfin from the
pre-device-swap commit and aborted before reaching the placeholder happy
path. Sync the placeholder metadata to a52sxq/34 (adreno) and bump the
mali android_sdk to 33 to match the version bump. Empty stages, so first
real run will still flow through the placeholder branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant