feat: add perf metrics and frames commands#703
Open
thymikee wants to merge 3 commits into
Open
Conversation
|
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
1f9dd90 to
81c7ab4
Compare
81c7ab4 to
535ec37
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an explicit
perfsubcommand API for session performance evidence:agent-device perf metrics --jsonreturns the broad session metrics payload: startup, CPU, memory, and frame health where supported.agent-device perf frames --jsonreturns a focused frame/jank-health payload with onlymetrics.fpsandsampling.fps.agent-device perf --jsonandagent-device metrics --jsonremain compatibility aliases forperf metrics --json.Structured clients now project the same API through
client.observability.perf({ area: 'metrics' })andclient.observability.perf({ area: 'frames' });{ action: 'sample' }is accepted for the current sampling action. Invalid areas/actions are rejected in both CLI parsing and daemon handling.perf framesuses a frame-only sampling path, so it avoids CPU/memory collection when agents are repeatedly checking focused jank windows. CLI help, website docs, and SkillGym guidance now route native slowness toperf metrics/perf framesand keep React render profiling underreact-devtools.Closes #695
Validation
Local validation passed:
pnpm check:fallow --base origin/mainpnpm exec vitest run src/utils/__tests__/perf-args.test.ts src/__tests__/cli-perf.test.ts src/__tests__/client.test.ts src/daemon/handlers/__tests__/session-perf-area.test.tspnpm check:quickgit diff --check origin/main...HEADCI reran on
81c7ab4be; the previously failingFallow Code Qualitycheck is fixed.