Time-based sampling profiler showing WHERE execution time is spent (wall-clock time, not frequency). Provides histogram with self/total time, compilation tiers (T0/T1/T2), and flame graphs. Use as FIRST step to identify hot functions consuming most time. Low overhead, suitable for longer runs. Pair with tracing-execution-counts to understand time-per-execution vs execution frequency. (project)
Identifies hot functions consuming execution time using wall-clock sampling with compilation tier analysis.
/plugin marketplace add antonykamp/cc-truffle-performance-plugin/plugin install antonykamp-cc-truffle-performance-plugin@antonykamp/cc-truffle-performance-pluginThis skill inherits all available tools. When active, it can use any tool Claude has access to.
PATTERNS.mdTime-based sampling profiler that identifies WHERE your program spends execution time. Shows wall-clock time distribution across functions with compilation tier breakdown.
Use FIRST when investigating any performance issue:
# Basic profiling
<launcher> --cpusampler <program>
# With tier breakdown (RECOMMENDED)
<launcher> --cpusampler --cpusampler.ShowTiers=true <program>
# Skip warmup (recommended for steady-state analysis)
<launcher> --cpusampler --cpusampler.Delay=5000 --cpusampler.ShowTiers=true <program>
Before running:
<launcher> --cpusampler -c 'print 1;' → Verify output formatAfter running:
--help:cpusampler, test on known-good input)tool-outputs/cpu-sampler-[benchmark].txtGate: All boxes checked? → Proceed to analysis
| Option | Description | Recommended Value |
|---|---|---|
--cpusampler.ShowTiers=true | Show T0/T1/T2 breakdown | Always use |
--cpusampler.Delay=<ms> | Skip warmup | 2000-10000 |
--cpusampler.Period=<ms> | Sample interval | 10 (default) |
--cpusampler.Output=calltree | Output format | Default: histogram |
--cpusampler.OutputFile=<file> | Save to file | For later analysis |
--cpusampler.SampleInternal=true | Include internal frames | For Truffle debugging |
| Tier | Meaning | Target |
|---|---|---|
| T0 | Interpreter | <10% for hot functions |
| T1 | First-tier compiled | Transitional |
| T2 | Fully optimized | >80% for hot functions |
Sampling Histogram. Recorded 412 samples with period 10ms.
Self Time: Time spent in function (excluding callees)
Total Time: Time in function including callees
Name || Total Time || Self Time || T0 | T1 | T2
queens || 1850ms 88.0% || 1850ms 88.0% || 5.2% | 3.1% | 91.7%
hasConflict || 250ms 11.9% || 250ms 11.9% || 8.8% | 4.2% | 87.0%
Next steps based on findings:
| Finding | Next Skill |
|---|---|
| High T0 time | tracing-compilation-events |
| Optimization barriers | detecting-performance-warnings |
| Memory issues suspected | profiling-memory-allocations |
| Inlining problems | tracing-inlining-decisions |
tracing-execution-counts - Execution frequency (not time)detecting-performance-warnings - Find optimization barrierstracing-compilation-events - Compilation behaviorestablishing-benchmark-baseline - Set up benchmarks first# Full help
<launcher> --help:cpusampler
See PATTERNS.md for common problem patterns and solutions.
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.