Counts exact execution frequencies (not time) at function/statement level. Shows interpreted vs compiled execution split. Use to verify functions compile (>95% compiled), understand control flow patterns, and validate algorithmic complexity. Complements profiling-with-cpu-sampler by showing frequency rather than duration. (project)
Counts function and statement execution frequencies to verify compilation rates and validate algorithmic complexity.
/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.
Counts exact execution frequencies (NOT time) at function and statement level. Complements CPU Sampler by showing HOW OFTEN code runs rather than how much time it takes.
# Basic execution count tracing
<launcher> --cputracer <program>
# With tier breakdown (RECOMMENDED)
<launcher> --cputracer --cputracer.TraceTiers=true <program>
# Per-statement granularity
<launcher> --cputracer --cputracer.TraceStatements=true <program>
Before running:
<launcher> --cputracer -c 'var x = 0; for (var i = 0; i < 10; i = i + 1) { x = x + 1; }' → Verify countsAfter running:
tool-outputs/cpu-tracer-[benchmark].txtGate: All boxes checked? → Proceed to analysis
| Option | Description | Recommended |
|---|---|---|
--cputracer.TraceTiers=true | Show interpreted vs compiled | Always use |
--cputracer.TraceStatements=true | Statement-level detail | When needed |
--cputracer.FilterRootName=<name> | Filter by function | Focus analysis |
--cputracer.Output=json | JSON output | For parsing |
--cputracer.OutputFile=<file> | Save to file | For analysis |
Tracing Histogram. Counted 1234567 executions.
Name || Count || Interpreted | Compiled
queens || 500000 40% || 2.1% | 97.9% ✅
hasConflict || 750000 60% || 1.8% | 98.2% ✅
| Compiled % | Status | Action |
|---|---|---|
| >95% | ✅ Good | Code is well-optimized |
| 80-95% | ⚠️ Check | May have warmup or minor issues |
| <80% | ❌ Problem | Compilation failures or deoptimization |
A function called 1M times at 1µs each = 1 second total. A function called 100 times at 10ms each = 1 second total.
Same time, very different optimization strategies!
Expected for queens(N=8):
- hasConflict called ~92 times per queen placement
- Total calls = O(N!)
If counts much higher → algorithm issue
If counts much lower → early termination bug
| Finding | Next Skill |
|---|---|
| Low compiled % | tracing-compilation-events |
| Unexpected counts | Review algorithm |
| Hot functions | profiling-with-cpu-sampler for time |
profiling-with-cpu-sampler - Time-based profilingtracing-compilation-events - Why compilation failsdetecting-performance-warnings - Optimization barriers<launcher> --help:cputracer
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.