| name | trace-operations |
| description | Capture and replay 3Lens traces for debugging, performance analysis, and regression testing. Use when recording traces, opening/replaying saved traces, or exporting trace data for sharing. Use when this capability is needed. |
| metadata | {"author":"adriandarian"} |
Trace Operations
Trace operations are the foundation of 3Lens analysis. Use these commands to capture, replay, and export render traces.
When to Use
- Recording a baseline before making changes
- Capturing a performance spike reproduction
- Sharing traces for debugging or collaboration
- Comparing before/after states
Commands
Record a Trace
3lens trace:record --duration 10s --out ./traces/runA.json
3lens trace:record --frames 300 --out ./traces/runA.json
3lens trace:record --until-idle --out ./traces/runA.json
Options:
| Option | Description |
|---|
--duration <seconds> | Record for specified time |
--frames <count> | Record specified number of frames |
--until-idle | Record until frame time stabilizes |
--mode <MINIMAL|STANDARD|DEEP> | Capture mode |
--contexts <ids> | Specific contexts to record |
Open/Replay a Trace
3lens trace:open ./traces/runA.json
3lens trace:open ./traces/runA.json --headless
Export Trace
3lens trace:export ./traces/runA.json --profile MINIMAL --out ./report.json
3lens trace:export ./traces/runA.json --profile FULL_REDACTED --out ./share.json
Export Profiles: MINIMAL, STANDARD, FULL, FULL_REDACTED
Agent Use Cases
- Before refactoring: "Record a baseline trace before the shader refactor"
- Bug reproduction: "Capture a trace when the memory spike occurs"
- CI regression: "Record traces for baseline comparison"
Additional Resources
Converted and distributed by TomeVault — claim your Tome and manage your conversions.