Skip to content

LBA REQ 105

github-actions[bot] edited this page Nov 25, 2026 · 2 revisions

LBA-REQ-105: Correlated capture of GPU samples, agent cues and clips

Status

Planned

Area

Capture / agentic infrastructure (ADR-0095)

Statement

The system shall correlate a local capture's GPU samples, agent cues and screen frames on the capture's own time base and export the frames between two markers as a local clip, returning only metadata over MCP.

Rationale

A local model that drives a workload needs the GPU load, its own cues and the screen between two instants on one clock. Screen frames are sensitive, so they stay on the machine that holds the capture (#134).

Acceptance Criteria

  • While a capture runs, a one-shot nvidia-smi --query-gpu=timestamp,utilization.gpu,memory.used,power.draw is sampled at the existing cadence; the sample time is the timestamp column, not the arrival time. The index and name of every GPU are recorded once. Without nvidia-smi, or when no sample succeeds, the series is recorded unavailable with the reason, never as zeros. [N/A] values stay null.
  • The GPU series is persisted additively in capture.json (captures without it load unchanged), returned by get_benchmark_series for a given runId, and charted by the frame correlator.
  • add_capture_marker adds an agent-cue marker (label at most 80 characters) at an instant or a frame index through the same resolveMarkerImageGrab as a user click. After a capture, GPU memory rising more than 100 MiB above the first sample ("model load") and utilization rising through gpuCueThresholdPct (default 10%, "compute") each add one debounced cue; the measured utilization lag of the platform is recorded with the cue.
  • export_capture_clip, the Export Clip Between Markers command and the captureClip CLI encode the frames between two markers (default the latest two, counting exact twins once) or two frame indices, with an optional crop validated against the frame size, into clips/clip-<from>-<to>.mp4 (H.264, yuv420p, even size) inside the capture, holding each frame for its real interval and capping the output at the real duration. The receipt lists both markers' instants, toleranceMs, deltaMs and admitted, the inclusive frame range, the frame rate, the SHA-256, the size and the duration. Markers of another capture, an end before the start, an empty range, a crop outside the frame and a missing ffmpeg are rejected.
  • The new MCP tools are not enabled by default for the Ollama bridge and return no pixels.

Verification

node test/correlated-capture.mjs, node test/extension-activation.mjs and node test/mcp-server.mjs (T-105); a real nvidia-smi parse and a real ffmpeg clip on a LINUX workstation are recorded on the pull request. A Windows live capture remains to be proven.

Historical statement (no longer implemented)

Supersession

Change Guidance

TestID

T-105

CodeRef

src/gpuSamples.ts; src/captureMarkers.ts; src/captureClip.ts; experiments/resource-usage-correlation/markerImageGrab.mjs; experiments/resource-usage-correlation/frameMarkers.mjs; experiments/mprr-capture-ring/frame-correlator.mjs; src/extension.ts; src/mcp/benchmarkActorMcpServer.ts; src/mcp/runBenchmarkActorMcpServer.ts; src/mcp/benchmarkActorMcpServerProvider.ts; package.json; test/correlated-capture.mjs; test/extension-activation.mjs; test/mcp-server.mjs; docs/architecture/adr/ADR-0095-correlated-capture-local-clips.md

RTM Status

Planned

Clone this wiki locally