Skip to content

add mobench support to ProveKit v1#430

Open
dcbuild3r wants to merge 2 commits into
v1from
dcbuild3r/mobench-v1-browserstack
Open

add mobench support to ProveKit v1#430
dcbuild3r wants to merge 2 commits into
v1from
dcbuild3r/mobench-v1-browserstack

Conversation

@dcbuild3r
Copy link
Copy Markdown
Collaborator

@dcbuild3r dcbuild3r commented May 2, 2026

Summary

  • add v1 mobench BrowserStack wiring for passport age-check and OPRF prove benchmarks
  • run the same full Android/iOS triad matrix as PR add mobench support to ProveKit main #429
  • fix Android prove timing so fixture clone/setup is outside the measured prove span
  • use jemalloc as the Android fallback allocator under the native C FFI allocator
  • harden Android incomplete-fixture reporting with timeout/build/kill-evidence fields

Android mobench fix note

The earlier failing run was https://github.com/worldfnd/provekit/actions/runs/26002840796. The missing Vivo Y21 monolithic cell did not recover a BrowserStack session payload or summary.json; available artifacts only show the BrowserStack fetch timeout after 7200s for build b1ebace919a1b8cad3861313180ac9a18a7e461d. I grepped the recovered Android artifacts and job log for lowmemorykiller, Process * was killed, oom_reaper, SIGKILL, and abnormal signal text; there was no hit because BrowserStack did not return the killed session logs for that cell.

Before/failure memory from that run:

  • Vivo Y21 OPRF: 291 MB process peak, 9.614s
  • Vivo Y21 fragmented age check: 1206 MB process peak, 44.896s
  • Vivo Y21 monolithic age check: no row; BrowserStack timeout/no summary
  • S24 OPRF: 365 MB process peak, 2.216s

What changed:

  • Android and iOS now use the same semantic boundary for prove benches: per-iteration fixture setup happens before the measured closure, and profile_phase("prove") wraps only the prover entry point. Previously prepared.clone() ran inside profile_phase("prove"), so clone cost and peak memory were charged to proving.
  • Android native C FFI fallback allocation now routes through jemalloc instead of Bionic malloc when no host callback/mmap allocator is active.
  • If BrowserStack returns no summary, failure.json now records attempts, fetch timeout seconds, build id, and any LMK/OOM/SIGKILL lines recovered from attempt/device logs.

After numbers: pending the fresh BrowserStack rerun on this commit.

Validation

  • cargo fmt --all
  • cargo test -p bench-mobile --lib
  • cargo test -p bench-mobile --test examples_smoke
  • cargo test -p bench-mobile --test passport_smoke
  • cargo check -p provekit-ffi --target aarch64-linux-android with NDK 26.1 aarch64-linux-android34-clang
  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/mobile-bench-reusable.yml")'
  • git diff --check

@dcbuild3r
Copy link
Copy Markdown
Collaborator Author

dcbuild3r commented May 2, 2026

Mobench Benchmark Results

Benchmark Summary

  • Generated: 2026-05-21T07:57:44.744802Z
  • Target: Android
  • Function: bench_mobile::bench_oprf_prove
  • Iterations/Warmup: 2 / 1
  • Devices: Samsung Galaxy M32-11.0
Device Function Samples Warmup Wall mean / iter Wall total CPU median / iter CPU total CPU / wall Peak growth Process peak
Samsung Galaxy M32 bench_mobile::bench_oprf_prove 2 1 6.163s 12.325s 10.111s 20.222s 164.1% - 292.45 MB

Device Comparison Plots

oprf-prove

oprf-prove

Android Sina Plot

android Sina plot


Posted by mobench at 2026-05-21 10:58 UTC

@dcbuild3r dcbuild3r marked this pull request as ready for review May 3, 2026 22:11
Copy link
Copy Markdown
Collaborator Author

dcbuild3r commented May 11, 2026

Pushed b83ddbd6 with the same mobench follow-ups on the v1 branch:

  • mobile artifacts are generated by the workflow instead of checked into bench-mobile
  • bench-mobile now routes prepare/prove/verify through provekit-ffi
  • automatic PR mobench runs now use the triad profile for low/current, mid-tier, and flagship Android/iOS devices
  • iOS triad uses the schedulable low-tier fallback (iPhone SE 2020-16) plus iPhone 15-17 and iPhone 16 Pro-18, so the low-tier iPhone 7 scheduling limitation does not collapse the whole triad run

This branch keeps the v1 Noir toolchain (v1.0.0-beta.11) in the generated-artifact workflow steps.

@dcbuild3r dcbuild3r force-pushed the dcbuild3r/mobench-v1-browserstack branch from 8581e80 to b83ddbd Compare May 11, 2026 15:50
@dcbuild3r dcbuild3r added the bench Run mobile benchmarks on PRs label May 11, 2026 — with ChatGPT Codex Connector
@dcbuild3r dcbuild3r added bench Run mobile benchmarks on PRs and removed bench Run mobile benchmarks on PRs labels May 14, 2026
@dcbuild3r dcbuild3r added bench Run mobile benchmarks on PRs and removed bench Run mobile benchmarks on PRs labels May 14, 2026
@dcbuild3r dcbuild3r force-pushed the dcbuild3r/mobench-v1-browserstack branch from 0c1d83d to c4cb902 Compare May 14, 2026 14:39
@dcbuild3r dcbuild3r added bench Run mobile benchmarks on PRs and removed bench Run mobile benchmarks on PRs labels May 14, 2026
@dcbuild3r dcbuild3r added bench Run mobile benchmarks on PRs and removed bench Run mobile benchmarks on PRs labels May 14, 2026
@dcbuild3r dcbuild3r added bench Run mobile benchmarks on PRs and removed bench Run mobile benchmarks on PRs labels May 15, 2026
@dcbuild3r dcbuild3r added bench Run mobile benchmarks on PRs and removed bench Run mobile benchmarks on PRs labels May 15, 2026
@dcbuild3r dcbuild3r added bench Run mobile benchmarks on PRs and removed bench Run mobile benchmarks on PRs labels May 15, 2026
@dcbuild3r dcbuild3r force-pushed the dcbuild3r/mobench-v1-browserstack branch from 8112bde to fdecffd Compare May 16, 2026 20:08
@dcbuild3r dcbuild3r added bench Run mobile benchmarks on PRs and removed bench Run mobile benchmarks on PRs labels May 16, 2026
@dcbuild3r
Copy link
Copy Markdown
Collaborator Author

/mobench platform=both device_profile=triad iterations=2 warmup=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bench Run mobile benchmarks on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant