Skip to content

Commit 25f33e3

Browse files
committed
docs: split perf guidance into skill reference
1 parent c565cb0 commit 25f33e3

2 files changed

Lines changed: 57 additions & 12 deletions

File tree

skills/agent-device/SKILL.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,10 @@ agent-device trace stop ./trace.log
102102
agent-device batch --steps-file /tmp/batch-steps.json --json
103103
```
104104

105-
### Performance Check (current support)
105+
### Performance Check
106106

107-
```bash
108-
agent-device open Settings --platform ios
109-
agent-device perf --json
110-
```
111-
112-
- `perf` (alias: `metrics`) is session-scoped and currently reports startup timing samples only.
113-
- Sampling method is `open-command-roundtrip` in milliseconds around each `open` dispatch.
114-
- Startup values are useful for regression tracking between builds and runs on the same target/setup.
115-
- Do not treat current startup value as app-level first frame / first interactive telemetry.
116-
- `fps`, `memory`, and `cpu` are placeholders in the current release.
107+
- Use `agent-device perf --json` (or `metrics --json`) after `open`.
108+
- For detailed metric semantics, caveats, and interpretation guidance, see [references/perf-metrics.md](references/perf-metrics.md).
117109

118110
## Guardrails (High Value Only)
119111

@@ -131,7 +123,6 @@ agent-device perf --json
131123
- `full|limited` mode applies only to iOS `photos`; other targets reject mode.
132124
- On Android, non-ASCII `fill/type` may require an ADB keyboard IME on some system images; only install IME APKs from trusted sources and verify checksum/signature.
133125
- If using `--save-script`, prefer explicit path syntax (`--save-script=flow.ad` or `./flow.ad`).
134-
- For perf analysis, compare like-for-like runs (same device, app build, and session workflow) to reduce noise.
135126

136127
## Security and Trust Notes
137128

@@ -157,3 +148,4 @@ agent-device perf --json
157148
- [references/video-recording.md](references/video-recording.md)
158149
- [references/coordinate-system.md](references/coordinate-system.md)
159150
- [references/batching.md](references/batching.md)
151+
- [references/perf-metrics.md](references/perf-metrics.md)
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Performance Metrics (`perf` / `metrics`)
2+
3+
Use this reference when you need to measure launch performance in agent workflows.
4+
5+
## Quick flow
6+
7+
```bash
8+
agent-device open Settings --platform ios
9+
agent-device perf --json
10+
```
11+
12+
Alias:
13+
14+
```bash
15+
agent-device metrics --json
16+
```
17+
18+
## What is measured today
19+
20+
- Session-scoped `startup` timing only.
21+
- Sampling method: `open-command-roundtrip`.
22+
- Unit: milliseconds (`ms`).
23+
- Source: elapsed wall-clock time around each session `open` command dispatch for the active app target.
24+
25+
## Output fields to use
26+
27+
- `metrics.startup.lastDurationMs`: most recent startup sample.
28+
- `metrics.startup.lastMeasuredAt`: ISO timestamp of most recent sample.
29+
- `metrics.startup.sampleCount`: number of retained samples.
30+
- `metrics.startup.samples[]`: recent startup history for the current session.
31+
- `sampling.startup.method`: current sampling method identifier.
32+
33+
## Platform support (current)
34+
35+
- iOS simulator: supported for startup sampling.
36+
- iOS physical device: supported for startup sampling.
37+
- Android emulator/device: supported for startup sampling.
38+
- `fps`, `memory`, and `cpu`: currently placeholders (`available: false`).
39+
40+
## Interpretation guidance
41+
42+
- Treat startup values as command round-trip timing, not true app first-frame or first-interactive telemetry.
43+
- Compare like-for-like runs:
44+
- same device target
45+
- same app build
46+
- same workflow/session steps
47+
- Use multiple runs and compare trend/median, not one-off samples.
48+
49+
## Common pitfalls
50+
51+
- Running `perf` before any `open` in the session yields no startup sample yet.
52+
- Comparing values across different devices/runtimes introduces large noise.
53+
- Interpreting current `startup` as CPU/FPS/memory would be incorrect.

0 commit comments

Comments
 (0)