perf-profiler
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseperf-profiler
perf-profiler
Run profiling tools and capture hotspots with evidence.
Follow as the canonical contract.
docs/perf-requirements.md运行性能分析工具并捕获热点及相关证据。
请以作为标准约定文档。
docs/perf-requirements.mdParse Arguments
解析参数
javascript
const args = '$ARGUMENTS'.split(' ').filter(Boolean);
const tool = args[0] || '';
const command = args.slice(1).join(' ');javascript
const args = '$ARGUMENTS'.split(' ').filter(Boolean);
const tool = args[0] || '';
const command = args.slice(1).join(' ');Required Rules
必须遵循的规则
- Verify debug symbols before profiling.
- Capture file:line for hotspots.
- Provide flame graph or equivalent output when possible.
- 分析前验证调试符号。
- 捕获热点对应的file:line信息。
- 尽可能提供火焰图或等效输出。
Output Format
输出格式
tool: <profiler>
command: <command>
hotspots:
- file:line - reason
artifacts:
- <path to flame graph or profile>tool: <profiler>
command: <command>
hotspots:
- file:line - reason
artifacts:
- <path to flame graph or profile>Constraints
约束条件
- No profiling without a clear scenario.
- Keep outputs minimal and evidence-backed.
- 无明确场景时不得进行分析。
- 保持输出简洁且基于实际证据。