Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
1f8525a
Initial commit
tfe-app[bot] Dec 4, 2025
b4a55ef
Add .github/workflows/relyance-sci.yml
wld-terraform Dec 4, 2025
0c4c6e4
Update .github/workflows/relyance-sci.yml
wld-terraform Dec 16, 2025
29669ce
Update .github/workflows/relyance-sci.yml
wld-terraform Dec 16, 2025
ce6f464
Bootstrap mobile-bench-rs with UniFFI integration, BrowserStack runs/…
dcbuild3r Jan 12, 2026
76bf41a
feat: Mobile benchmarking SDK (Phase 1 MVP) + Performance Metrics (v0…
dcbuild3r Jan 15, 2026
78ce38d
Update .github/workflows/relyance-sci.yml
wld-terraform Jan 16, 2026
e8f12bb
Add benchmark summaries, compare command, and CI polish (#5)
dcbuild3r Jan 16, 2026
24bd310
Refactor mobench layout and refresh README
dcbuild3r Jan 16, 2026
f5bde13
Remove legacy bench-cli crates and update docs
dcbuild3r Jan 16, 2026
625ab16
Split examples into minimal and FFI variants
dcbuild3r Jan 16, 2026
ca258c2
Remove legacy sample_fns UDL
dcbuild3r Jan 16, 2026
77da712
Remove legacy scripts and update docs
dcbuild3r Jan 16, 2026
68eaaa8
Refresh docs for mobench build flow
dcbuild3r Jan 16, 2026
56f8ef4
Improve repo root detection with ancestor search
dcbuild3r Jan 19, 2026
60fb5d3
Bump version to 0.1.7 for release
dcbuild3r Jan 19, 2026
8687215
Add commit guidelines to CLAUDE.md
dcbuild3r Jan 19, 2026
70e7fa0
Output mobile artifacts to target/mobench/ by default
dcbuild3r Jan 19, 2026
64c5196
Update docs for target/mobench/ output directory
dcbuild3r Jan 19, 2026
f853279
Add comprehensive docs.rs documentation
dcbuild3r Jan 19, 2026
f5c3a15
Bump version to 0.1.8 for release
dcbuild3r Jan 19, 2026
343fb04
Implement all IMPROVEMENTS.md tasks with enhanced DX
dcbuild3r Jan 19, 2026
ba2b3a9
Fix iOS test failure in auto-build scaffolding
dcbuild3r Jan 19, 2026
30ca95b
Update documentation for consolidated crates and new features
dcbuild3r Jan 19, 2026
d6f2da4
Bump version to 0.1.9 for release
dcbuild3r Jan 19, 2026
c1dab02
Remove IMPROVEMENTS.md after completing all tasks
dcbuild3r Jan 19, 2026
f3cca45
Fix all DX issues from mobench 0.1.9 testing
dcbuild3r Jan 19, 2026
5f9ca66
Update documentation for v0.1.9 and fix inconsistencies
dcbuild3r Jan 19, 2026
cd82475
Bump version to 0.1.10 for release
dcbuild3r Jan 19, 2026
a759806
Fix CI workflow paths to use target/mobench/ output directory
dcbuild3r Jan 19, 2026
2e2e280
Fix DX issues from 0.1.10 report
dcbuild3r Jan 19, 2026
aff2183
Bump version to 0.1.11 for release
dcbuild3r Jan 19, 2026
cc5d4fa
Update CLAUDE.md version reference to 0.1.11
dcbuild3r Jan 19, 2026
ebab92b
Fix DX issues from 0.1.11 report
dcbuild3r Jan 19, 2026
1346ef1
Fix all DX issues from bug reports
dcbuild3r Jan 19, 2026
b921f70
Remove IMPROVEMENTS.md after completing all tasks
dcbuild3r Jan 19, 2026
b3877a1
Fix all DX issues from mobench 0.1.9 testing
dcbuild3r Jan 19, 2026
99cfd6c
Update documentation for v0.1.9 and fix inconsistencies
dcbuild3r Jan 19, 2026
9d9e4f1
Bump version to 0.1.10 for release
dcbuild3r Jan 19, 2026
48f5b8c
Fix CI workflow paths to use target/mobench/ output directory
dcbuild3r Jan 19, 2026
752b6a5
Fix DX issues from 0.1.10 report
dcbuild3r Jan 19, 2026
1f32189
Bump version to 0.1.11 for release
dcbuild3r Jan 19, 2026
72a1d90
Update CLAUDE.md version reference to 0.1.11
dcbuild3r Jan 19, 2026
c8e3458
Fix DX issues from 0.1.11 report
dcbuild3r Jan 19, 2026
3102a8f
Fix all DX issues from bug reports
dcbuild3r Jan 19, 2026
003763f
Add --release flag and package-xcuitest command
dcbuild3r Jan 20, 2026
8d8c8b9
Update mobile timing display and documentation
dcbuild3r Jan 20, 2026
ac9679a
Fix iOS XCUITest benchmark report gap and add video capture delay
dcbuild3r Jan 20, 2026
2162217
Sync top-level templates with SDK templates
dcbuild3r Jan 20, 2026
8051be8
Update documentation for --release flag and iOS XCUITest features
dcbuild3r Jan 20, 2026
e4c0f22
Fix iOS XCUITest BrowserStack detection and video capture
dcbuild3r Jan 20, 2026
1b4f9ba
Remove resolved issue tracking docs
dcbuild3r Jan 20, 2026
6ed04f0
Remove stale DX report doc
dcbuild3r Jan 20, 2026
97fecca
Bump version to 0.1.12 for release
dcbuild3r Jan 20, 2026
01f4270
Fix error message hints
dcbuild3r Jan 20, 2026
b5c905a
Fix iOS XCUITest test name mismatch with BrowserStack
dcbuild3r Jan 20, 2026
ade279e
Bump version to 0.1.13 for release
dcbuild3r Jan 20, 2026
3d85d84
Modernize build flow and examples (#6)
dcbuild3r Jan 21, 2026
d74d83c
Merge branch 'dcbuild3r/consolidate-runner-crate' - Consolidate moben…
dcbuild3r Jan 21, 2026
2c5c73b
Merge branch 'dcbuild3r/dx-fixes-0.1.10-onwards' - DX fixes for moben…
dcbuild3r Jan 21, 2026
62439d4
Merge remote main with local merged PRs #7 and #8
dcbuild3r Jan 21, 2026
b81d3f7
DX Improvements v0.1.13: Setup/teardown, new commands, better errors …
dcbuild3r Jan 21, 2026
404787f
Mobench CI Contract v1: CLI orchestration, reports, action + docs (re…
dcbuild3r Feb 23, 2026
9dbe978
chore: bump to 0.1.15, add comfy-table dependency
dcbuild3r Feb 26, 2026
41d49df
feat: add ci summarize subcommand scaffold with args
dcbuild3r Feb 26, 2026
a7c2ec7
feat: add summarize data types module
dcbuild3r Feb 26, 2026
3ec1aa7
feat: implement offline results loading for ci summarize
dcbuild3r Feb 26, 2026
8af5467
feat: implement table, markdown, and json rendering for ci summarize
dcbuild3r Feb 26, 2026
0d522b0
feat: add session details and build summary to BrowserStack client
dcbuild3r Feb 26, 2026
a1e0c5b
feat: implement BrowserStack API enrichment for ci summarize
dcbuild3r Feb 26, 2026
1b30f12
feat: wire up ci summarize command handler
dcbuild3r Feb 26, 2026
9f57460
feat: add ci check-run subcommand scaffold
dcbuild3r Feb 26, 2026
542e28a
feat: add GitHub Checks API client module
dcbuild3r Feb 26, 2026
8f0ddb5
feat: wire up ci check-run with regression detection
dcbuild3r Feb 26, 2026
4a260e0
feat: add reusable benchmark workflow for consumer repos
dcbuild3r Feb 26, 2026
c21fe79
feat: add interim sticky PR comment to reusable workflow summarize job
dcbuild3r Feb 26, 2026
dadc1e4
fix: address code review findings (artifact params, permissions, chec…
dcbuild3r Mar 2, 2026
5fa0b5f
fix: remove dead CLI flags, parse std_dev_ns, add annotation guards
dcbuild3r Mar 4, 2026
e25abbc
docs: capture mobench 0.1.17 resolver design
dcbuild3r Mar 23, 2026
e0aceb5
feat: make mobench project resolution config-first
dcbuild3r Mar 23, 2026
274420d
chore: drop tracked plan docs from pr
dcbuild3r Mar 23, 2026
abef105
docs: update release docs for 0.1.17
dcbuild3r Mar 23, 2026
4db84f3
fix: address code review findings for PR #16
dcbuild3r Mar 23, 2026
092071b
chore: add mobench logo to README
dcbuild3r Mar 23, 2026
0e1d383
fix: crate name interpolation bugs for custom projects
dcbuild3r Mar 24, 2026
6c187fd
chore: prepare 0.1.18 release
dcbuild3r Mar 24, 2026
c455e31
feat: built-in device profiles, multi-function ci run, reusable PR wo…
dcbuild3r Mar 24, 2026
13a40b4
chore: prepare 0.1.19 release
dcbuild3r Mar 24, 2026
c937c44
fix: use continue-on-error for GitHub App token in reusable workflow
dcbuild3r Mar 24, 2026
05141c4
fix: pass --crate-path to build/package commands, fix Android SDK setup
dcbuild3r Mar 24, 2026
2a8020c
feat: add self-test workflow, pass --crate-path to all build commands
dcbuild3r Mar 24, 2026
d59f521
fix: ensure Rust targets installed, robust Android NDK setup
dcbuild3r Mar 24, 2026
d5948fc
fix: resolve ANDROID_NDK_HOME once via GITHUB_ENV, simplify target setup
dcbuild3r Mar 24, 2026
d7765a9
fix: force rust-std download for cross-compilation targets
dcbuild3r Mar 24, 2026
35dc50e
fix: use rustc sysroot for iOS target detection, bump 0.1.20
dcbuild3r Mar 24, 2026
4c1466d
fix: add --crate-path to ci run command and reusable workflow
dcbuild3r Mar 24, 2026
5b87c3c
chore: bump to 0.1.21 for ci run --crate-path support
dcbuild3r Mar 24, 2026
51331c2
fix browserstack ci fetch and release 0.1.22
dcbuild3r Mar 25, 2026
de42d3c
docs: add sina-style device plot design
dcbuild3r Mar 26, 2026
dc649a6
feat: extract plot payloads from benchmark results
dcbuild3r Mar 26, 2026
f64a007
fix: walk nested benchmark result files for plots
dcbuild3r Mar 26, 2026
81bd1e5
fix: preserve duplicate plot samples
dcbuild3r Mar 26, 2026
6c72283
fix: preserve non-root duplicate plot runs
dcbuild3r Mar 26, 2026
ecddfc3
feat: add python renderer for sina-style plots
dcbuild3r Mar 26, 2026
8941b77
fix: harden sina plot packing validation
dcbuild3r Mar 26, 2026
2581b23
fix: adapt sina plot layout for dense columns
dcbuild3r Mar 26, 2026
2e6b6ac
fix: align sina median markers with packed columns
dcbuild3r Mar 26, 2026
f5a7582
feat: add rust plot runner for embedded python renderer
dcbuild3r Mar 26, 2026
db05333
feat: add rust plot runner for embedded python renderer
dcbuild3r Mar 26, 2026
ce2c09c
feat: embed device comparison plots in local summary markdown
dcbuild3r Mar 26, 2026
5c5352d
chore: silence unused plot helper warnings
dcbuild3r Mar 26, 2026
7c7a7d6
release: prepare v0.1.23
dcbuild3r Mar 26, 2026
91672b6
docs: update ci and plotting docs for v0.1.23
dcbuild3r Mar 26, 2026
449fc7e
fix: use unified BrowserStack device inventory
dcbuild3r Mar 26, 2026
ba2deb5
chore: bump version to 0.1.24
dcbuild3r Mar 26, 2026
15038ee
feat: add experimental profiling session commands (#18)
dcbuild3r Mar 26, 2026
031678f
ci: add mobench fixture workflows
dcbuild3r Mar 26, 2026
d83835e
chore: ignore project worktrees
dcbuild3r Mar 26, 2026
fdbb3e1
feat: make profiling local-first and explicit
dcbuild3r Mar 26, 2026
d693dd2
fix: exercise mobench fixture CI end to end
dcbuild3r Mar 26, 2026
437ce0e
fix: install uniffi bindgen in benchmark CI
dcbuild3r Mar 27, 2026
fdaa867
fix: install the actual uniffi bindgen cli
dcbuild3r Mar 27, 2026
b5af91b
docs: add profiling upgrades design
dcbuild3r Mar 27, 2026
c4faf3a
test: freeze profiling upgrade targets
dcbuild3r Mar 27, 2026
af9f859
test: freeze profiling upgrade targets
dcbuild3r Mar 27, 2026
5b04f83
fix: align ios low-spec profile with deployment target
dcbuild3r Mar 27, 2026
54cf7f3
test: freeze profiling upgrade targets
dcbuild3r Mar 27, 2026
06d8191
test: tighten profiling freeze assertions
dcbuild3r Mar 27, 2026
58f9642
refactor: split profile manifest into native and semantic sections
dcbuild3r Mar 27, 2026
e399620
docs: realign profiling README with local-first behavior
dcbuild3r Mar 27, 2026
2e41a55
docs: align profiling README with current branch
dcbuild3r Mar 27, 2026
ea3b253
fix: preserve legacy profile manifest compatibility
dcbuild3r Mar 27, 2026
76d122e
feat: symbolize Android native profiling frames
dcbuild3r Mar 27, 2026
e8aef76
fix: write Android symbolized profile outputs
dcbuild3r Mar 27, 2026
763761f
Fix fixture benchmark summary and smoke CI
dcbuild3r Mar 27, 2026
f17dd03
Tighten CI markdown heading levels
dcbuild3r Mar 27, 2026
31b933c
feat: symbolize Android native profiling frames
dcbuild3r Mar 27, 2026
72d53f5
Forward CI regression threshold to benchmark runs
dcbuild3r Mar 27, 2026
48eeba8
fix: persist attempted android profile failures
dcbuild3r Mar 27, 2026
0db7de0
fix: tighten android profiling quality
dcbuild3r Mar 27, 2026
246e633
feat: add semantic phase profiling to mobench-sdk
dcbuild3r Mar 27, 2026
079b370
feat: add semantic phase profiling to mobench-sdk
dcbuild3r Mar 27, 2026
52a7069
feat: merge semantic phases into profile outputs
dcbuild3r Mar 27, 2026
782cb9b
Publish profiling SDK support for CI
dcbuild3r Mar 27, 2026
576f51f
feat: add local iOS flamegraph capture
dcbuild3r Mar 27, 2026
20a4b7b
ci: add shared mobench plot reporting
dcbuild3r Mar 27, 2026
53cb342
docs: add flamegraph viewer design
dcbuild3r Mar 27, 2026
e1ab0d5
Fix basic example mobile CI
dcbuild3r Mar 27, 2026
32ace53
Increase example benchmark workload
dcbuild3r Mar 27, 2026
aa7a5df
Clear cached CI baselines before runs
dcbuild3r Mar 28, 2026
70a9096
docs: add flamegraph tower collapse design
dcbuild3r Mar 28, 2026
99e7eef
Harden CI workflows, fix flaky test, and add resource usage coverage
dcbuild3r Mar 28, 2026
9c2d56c
feat: finalize local flamegraph profiling viewer
dcbuild3r Mar 28, 2026
17ce109
Merge profiling flamegraph upgrades into fixture CI branch
dcbuild3r Mar 28, 2026
95bfed0
docs: refresh profiling docs and sync mobile templates
dcbuild3r Mar 28, 2026
cd33b1f
docs: remove tracked planning artifacts
dcbuild3r Mar 28, 2026
f154c90
fix: package BrowserStack iOS IPAs with ditto
dcbuild3r Mar 28, 2026
23d42cb
fix: harden iOS IPA bundle packaging
dcbuild3r Mar 28, 2026
4af4d07
fix: stop embedding static iOS xcframeworks
dcbuild3r Mar 28, 2026
efb7297
fix: expose iOS device build failures
dcbuild3r Mar 28, 2026
7e0075e
fix: add semantic phases to ffi fixture report
dcbuild3r Mar 28, 2026
2cb22a7
docs: move release history into release notes
dcbuild3r Mar 28, 2026
518a547
release: cut 0.1.26
dcbuild3r Mar 28, 2026
2037c99
build: refresh lockfile for 0.1.26
dcbuild3r Mar 28, 2026
a5442f5
Release 0.1.27 (#20)
dcbuild3r Apr 2, 2026
2b8c660
Add measured resource metrics to mobench outputs (#23)
dcbuild3r Apr 12, 2026
5210e11
Release v0.1.31
dcbuild3r Apr 12, 2026
712d421
Fix 0.1.31 CI compatibility regressions (#24)
dcbuild3r Apr 17, 2026
1fbb72b
Release v0.1.33
dcbuild3r Apr 17, 2026
06138ed
docs: sync CI tables and Android prereqs
dcbuild3r Apr 18, 2026
3ff534d
Split memory growth from absolute peak
dcbuild3r Apr 21, 2026
6df1e93
Report benchmark process memory peak
dcbuild3r Apr 22, 2026
9b6795f
Keep mobile process memory reporting compatible
dcbuild3r Apr 22, 2026
d3c61c1
Run Android benchmarks in isolated worker process
dcbuild3r Apr 22, 2026
81236b0
Reduce Android worker memory sampler overhead
dcbuild3r Apr 23, 2026
b3dc85c
Block Android harness while worker runs
dcbuild3r Apr 23, 2026
5c808ca
Keep Android worker benchmarks alive
dcbuild3r Apr 23, 2026
2c0c2d0
Drop provider peak memory reporting
dcbuild3r Apr 23, 2026
3847f6c
Address PR memory reporting feedback
dcbuild3r Apr 23, 2026
b877197
chore: Release
dcbuild3r Apr 23, 2026
c95293a
Report iOS benchmark process peak memory
dcbuild3r Apr 24, 2026
b39b88c
chore: Release
dcbuild3r Apr 24, 2026
043d548
docs: add production readiness roadmap
dcbuild3r Apr 25, 2026
597c9e1
docs: link production readiness roadmap
dcbuild3r Apr 25, 2026
fea2f96
chore: complete gate 1 crate readiness
dcbuild3r Apr 26, 2026
ea5fb72
test: complete gate 2 output contracts
dcbuild3r Apr 26, 2026
004f19c
feat: complete gate 3 launch experience
dcbuild3r Apr 26, 2026
b30e35e
docs: evaluate later hardening priorities
dcbuild3r Apr 26, 2026
2dfd300
chore: split cli modules and add hardening checks
dcbuild3r Apr 26, 2026
b1c31fd
fix: harden benchmark release paths
dcbuild3r Apr 26, 2026
1bc898f
chore: prepare mobench 0.1.36 release candidate
dcbuild3r Apr 27, 2026
ad8ccef
fix: repair generated mobile harness resources
dcbuild3r Apr 27, 2026
c4a1737
fix: address release gate review findings
dcbuild3r Apr 27, 2026
e4c7908
Merge pr-26-review into dev
dcbuild3r Apr 27, 2026
1a3787d
docs: mark 0.1.36 as published
dcbuild3r Apr 27, 2026
ad053aa
docs: sync documentation with 0.1.36 release
dcbuild3r Apr 27, 2026
35a1f65
docs: move production roadmap to issue
dcbuild3r Apr 27, 2026
3a97e4c
release: prepare 0.1.37
dcbuild3r Apr 27, 2026
2b16713
chore: connect dev history to main
dcbuild3r Apr 27, 2026
af8cb37
fix: gate macos-only ios test import
dcbuild3r Apr 27, 2026
f1cd767
docs: move workflow diagrams near release notes
dcbuild3r Apr 27, 2026
42f59ed
Merge remote-tracking branch 'origin/main' into dev
dcbuild3r Apr 27, 2026
581ba61
Add Android benchmark watchdog release
dcbuild3r May 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ resolver = "2"
edition = "2024"
license = "MIT"
rust-version = "1.85"
version = "0.1.37"
version = "0.1.39"

[workspace.dependencies]
anyhow = "1"
Expand All @@ -34,5 +34,5 @@ proc-macro2 = "1"

# Phase 1: Template embedding
include_dir = "0.7"
mobench-macros = { version = "0.1.37", path = "crates/mobench-macros" }
mobench-sdk = { version = "0.1.37", path = "crates/mobench-sdk", default-features = false }
mobench-macros = { version = "0.1.39", path = "crates/mobench-macros" }
mobench-sdk = { version = "0.1.39", path = "crates/mobench-sdk", default-features = false }
188 changes: 95 additions & 93 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,99 +29,6 @@ that CI and humans can compare.
- Mobile apps call `run_benchmark` via the generated bindings and return timing samples
- The CLI collects results locally or from BrowserStack and writes summaries

## Workflow diagrams

The Mermaid sources live under `docs/diagrams/` so the same diagrams can be
reused in launch posts and landing-page assets.

### Crate architecture

```mermaid
flowchart LR
user["Benchmark crate"] --> macro["mobench-macros\n#[benchmark]"]
macro --> registry["mobench-sdk registry\ninventory"]
registry --> runner["mobench-sdk runner\nBenchSpec -> BenchReport"]
runner --> templates["Generated Android/iOS runners"]
cli["mobench CLI"] --> builders["SDK builders"]
builders --> templates
cli --> reports["JSON / Markdown / CSV / plots"]
templates --> reports
```

### Benchmark lifecycle

```mermaid
sequenceDiagram
participant Dev as Developer
participant CLI as mobench CLI
participant SDK as mobench-sdk
participant App as Generated mobile app
participant Device as Device or BrowserStack
participant Reports as Reports

Dev->>CLI: cargo mobench run
CLI->>SDK: resolve crate and benchmark spec
SDK->>SDK: build native libraries and generate bindings
SDK->>App: embed bench_spec.json and templates
CLI->>Device: install/upload and start run
Device->>App: execute benchmark function
App->>CLI: emit BenchReport JSON
CLI->>Reports: write summary.json, summary.md, results.csv
```

### BrowserStack CI lifecycle

```mermaid
flowchart TD
workflow["GitHub Actions"] --> resolve["Resolve device matrix"]
resolve --> build["Build APK or IPA/XCUITest"]
build --> upload["Upload artifacts to BrowserStack"]
upload --> run["Run benchmark on selected devices"]
run --> fetch["Fetch logs, reports, and metrics"]
fetch --> normalize["Normalize timing, CPU, and memory"]
normalize --> outputs["summary.json\nsummary.md\nresults.csv\nplots"]
outputs --> pr["Optional PR comment/check run"]
```

### Profiling artifact lifecycle

```mermaid
flowchart LR
run["profile run"] --> manifest["profile.json\nnative_capture\nsemantic_profile\ncapture_metadata"]
run --> raw["raw capture\nsimpleperf or sample"]
raw --> processed["processed stacks\nstacks.folded\nnative-report.txt"]
processed --> viewer["flamegraph.html\nfull and focused SVGs"]
manifest --> summary["summary.md"]
manifest --> semantic["artifacts/semantic/phases.json"]
viewer --> diff["profile diff\nbaseline vs candidate"]
summary --> diff
```

### SDK versus CLI responsibilities

```mermaid
flowchart TB
subgraph SDK["mobench-sdk"]
timing["timing harness"]
registry["benchmark registry"]
builders["Android/iOS builders"]
codegen["template/codegen"]
ffi["FFI-safe types"]
end

subgraph CLI["mobench CLI"]
config["config and project resolution"]
orchestration["build/run/profile orchestration"]
providers["BrowserStack and local providers"]
reporting["summary, plots, PR reports"]
end

SDK --> CLI
CLI --> SDK
user["Downstream benchmark crate"] --> SDK
ci["CI workflow"] --> CLI
```

## Workspace crates

- `crates/mobench` ([mobench](https://crates.io/crates/mobench)): CLI tool that builds, runs, and fetches benchmarks
Expand Down Expand Up @@ -299,6 +206,7 @@ min_sdk = 24
[ios]
bundle_id = "com.example.bench"
deployment_target = "15.0"
# runner = "swiftui" # or "uikit-legacy" for legacy iOS deployment targets

[benchmarks]
default_function = "my_crate::my_benchmark"
Expand All @@ -310,6 +218,7 @@ Resolution precedence is: explicit CLI flags (`--project-root`, `--crate-path`)

CLI flags override config file values when provided.
- In `cargo mobench run --config <FILE>` mode, `--device-matrix <FILE>` overrides `device_matrix` from the config file.
- iOS deployment targets below 15.0 use the UIKit legacy runner by default; forcing `runner = "swiftui"` below 15.0 fails early. Legacy targets such as iPhone 7 on iOS 10 also require an older Xcode lane capable of building for that OS.
- For regression comparisons, `--baseline` should point to a previous run summary; if it resolves to the same output path, mobench snapshots the prior file before writing the candidate summary.
- In the reusable GitHub workflow, the default baseline source is the latest successful run on the repository default branch when matching artifacts are available.
- `cargo mobench verify --smoke-test` is only supported for benchmark crates linked into the `mobench` CLI binary. External crates discovered through `mobench.toml`, `--project-root`, or `--crate-path` should use `cargo mobench list` and `cargo mobench verify --check-artifacts`.
Expand Down Expand Up @@ -405,6 +314,99 @@ fn db_query(db: &Database) {
| `#[benchmark(setup = fn, per_iteration)]` | Benchmarks that mutate input, need fresh data each time |
| `#[benchmark(setup = fn, teardown = fn)]` | Resources requiring cleanup (connections, files, etc.) |

## Workflow diagrams

The Mermaid sources live under `docs/diagrams/` so the same diagrams can be
reused in launch posts and landing-page assets.

### Crate architecture

```mermaid
flowchart LR
user["Benchmark crate"] --> macro["mobench-macros\n#[benchmark]"]
macro --> registry["mobench-sdk registry\ninventory"]
registry --> runner["mobench-sdk runner\nBenchSpec -> BenchReport"]
runner --> templates["Generated Android/iOS runners"]
cli["mobench CLI"] --> builders["SDK builders"]
builders --> templates
cli --> reports["JSON / Markdown / CSV / plots"]
templates --> reports
```

### Benchmark lifecycle

```mermaid
sequenceDiagram
participant Dev as Developer
participant CLI as mobench CLI
participant SDK as mobench-sdk
participant App as Generated mobile app
participant Device as Device or BrowserStack
participant Reports as Reports

Dev->>CLI: cargo mobench run
CLI->>SDK: resolve crate and benchmark spec
SDK->>SDK: build native libraries and generate bindings
SDK->>App: embed bench_spec.json and templates
CLI->>Device: install/upload and start run
Device->>App: execute benchmark function
App->>CLI: emit BenchReport JSON
CLI->>Reports: write summary.json, summary.md, results.csv
```

### BrowserStack CI lifecycle

```mermaid
flowchart TD
workflow["GitHub Actions"] --> resolve["Resolve device matrix"]
resolve --> build["Build APK or IPA/XCUITest"]
build --> upload["Upload artifacts to BrowserStack"]
upload --> run["Run benchmark on selected devices"]
run --> fetch["Fetch logs, reports, and metrics"]
fetch --> normalize["Normalize timing, CPU, and memory"]
normalize --> outputs["summary.json\nsummary.md\nresults.csv\nplots"]
outputs --> pr["Optional PR comment/check run"]
```

### Profiling artifact lifecycle

```mermaid
flowchart LR
run["profile run"] --> manifest["profile.json\nnative_capture\nsemantic_profile\ncapture_metadata"]
run --> raw["raw capture\nsimpleperf or sample"]
raw --> processed["processed stacks\nstacks.folded\nnative-report.txt"]
processed --> viewer["flamegraph.html\nfull and focused SVGs"]
manifest --> summary["summary.md"]
manifest --> semantic["artifacts/semantic/phases.json"]
viewer --> diff["profile diff\nbaseline vs candidate"]
summary --> diff
```

### SDK versus CLI responsibilities

```mermaid
flowchart TB
subgraph SDK["mobench-sdk"]
timing["timing harness"]
registry["benchmark registry"]
builders["Android/iOS builders"]
codegen["template/codegen"]
ffi["FFI-safe types"]
end

subgraph CLI["mobench CLI"]
config["config and project resolution"]
orchestration["build/run/profile orchestration"]
providers["BrowserStack and local providers"]
reporting["summary, plots, PR reports"]
end

SDK --> CLI
CLI --> SDK
user["Downstream benchmark crate"] --> SDK
ci["CI workflow"] --> CLI
```

## Release Notes

Published release history and support status live in
Expand Down
1 change: 1 addition & 0 deletions crates/mobench-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ target_sdk = 34
[ios]
bundle_id = "com.example.bench"
deployment_target = "15.0"
# runner = "swiftui" # or "uikit-legacy" for legacy iOS targets

[benchmarks]
default_function = "my_crate::my_benchmark"
Expand Down
18 changes: 17 additions & 1 deletion crates/mobench-sdk/src/builders/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,10 +791,21 @@ members = ["crates/*"]
let _ = std::fs::remove_dir_all(&temp_dir);
std::fs::create_dir_all(&temp_dir).unwrap();

let spec = EmbeddedBenchSpec {
#[derive(serde::Serialize)]
struct AndroidSpec {
function: String,
iterations: u32,
warmup: u32,
android_benchmark_timeout_secs: Option<u64>,
android_heartbeat_interval_secs: Option<u64>,
}

let spec = AndroidSpec {
function: "test_crate::first_run".to_string(),
iterations: 7,
warmup: 1,
android_benchmark_timeout_secs: Some(30),
android_heartbeat_interval_secs: Some(5),
};

embed_bench_spec(&temp_dir, &spec).expect("embed spec");
Expand All @@ -812,6 +823,11 @@ members = ["crates/*"]

let contents = std::fs::read_to_string(android_spec).unwrap();
assert!(contents.contains("test_crate::first_run"));
assert!(contents.contains("android_benchmark_timeout_secs"));
assert!(contents.contains("android_heartbeat_interval_secs"));
let json: serde_json::Value = serde_json::from_str(&contents).unwrap();
assert_eq!(json["android_benchmark_timeout_secs"], 30);
assert_eq!(json["android_heartbeat_interval_secs"], 5);

std::fs::remove_dir_all(&temp_dir).unwrap();
}
Expand Down
Loading
Loading