AgentSkillsCN

perf-profiler

在对CPU和内存的热点路径进行剖析、生成火焰图,或捕获JFR/Perf相关证据时使用。

SKILL.md
--- frontmatter
name: perf-profiler
description: "Use when profiling CPU/memory hot paths, generating flame graphs, or capturing JFR/perf evidence."
version: 5.0.0
argument-hint: "[tool] [command]"

perf-profiler

Run profiling tools and capture hotspots with evidence.

Follow docs/perf-requirements.md as the canonical contract.

Parse Arguments

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.

Output Format

code
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.