Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Identify computational bottlenecks, analyze scaling behavior, estimate memory requirements, and receive optimization recommendations for any computational simulation. Use when simulations are slow, investigating parallel efficiency, planning resource allocation, or seeking performance improvements through timing analysis, scaling studies, memory profiling, or bottleneck detection.
.claude/skills/performance-profiling/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-09 | ✗→✓ | ▲ Improved | — | — |
| case-10 | ✗→✓ | ▲ Improved | — | — |
| case-11 | ✗→✓ | ▲ Improved | — | — |
| case-06 | ✗→✓ | ▲ Improved | — | — |
| case-20 | ✗→✓ | ▲ Improved | — | — |
Provide tools to analyze simulation performance, identify bottlenecks, and recommend optimization strategies for computational materials science simulations.
Before running profiling scripts, collect from the user:
| Input | Description | Example | |-------|-------------|---------| | Simulation log | Log file with timing information | simulation.log | | Scaling data | JSON with multi-run performance data | scaling_data.json | | Simulation parameters | JSON with mesh, fields, solver config | params.json | | Available memory | System memory in GB (optional) | 16.0 |
Need to identify slow phases?
├── YES → Use timing_analyzer.py
│ └── Parse simulation logs for timing data
│
Need to understand parallel performance?
├── YES → Use scaling_analyzer.py
│ └── Analyze strong or weak scaling efficiency
│
Need to estimate memory requirements?
├── YES → Use memory_profiler.py
│ └── Estimate memory from problem parameters
│
Need optimization recommendations?
└── YES → Use bottleneck_detector.py
└── Combine analyses and get actionable advice| Metric | Good | Acceptable | Poor | |--------|------|------------|------| | Phase dominance | <30% | 30-50% | >50% | | Parallel efficiency | >0.80 | 0.70-0.80 | <0.70 | | Memory usage | <60% | 60-80% | >80% |
| Script | Key Outputs | |--------|-------------| | timing_analyzer.py | timing_data.phases, timing_data.slowest_phase, timing_data.total_time | | scaling_analyzer.py | scaling_analysis.results, scaling_analysis.efficiency_threshold_processors | | memory_profiler.py | memory_profile.total_memory_gb, memory_profile.per_process_gb, memory_profile.warnings | | bottleneck_detector.py | bottlenecks, recommendations |
bash# Basic timing analysis python3 scripts/timing_analyzer.py \ --log simulation.log \ --json # Custom timing pattern python3 scripts/timing_analyzer.py \ --log simulation.log \ --pattern 'Step\s+(\w+)\s+took\s+([\d.]+)s' \ --json
bash# Strong scaling (fixed problem size) python3 scripts/scaling_analyzer.py \ --data scaling_data.json \ --type strong \ --json # Weak scaling (constant work per processor) python3 scripts/scaling_analyzer.py \ --data scaling_data.json \ --type weak \ --json
bash# Estimate memory requirements python3 scripts/memory_profiler.py \ --params simulation_params.json \ --available-gb 16.0 \ --json
bash# Detect bottlenecks from timing only python3 scripts/bottleneck_detector.py \ --timing timing_results.json \ --json # Comprehensive analysis with all inputs python3 scripts/bottleneck_detector.py \ --timing timing_results.json \ --scaling scaling_results.json \ --memory memory_results.json \ --json
User: My simulation is taking too long. Can you help me identify what's slow?
Agent workflow:
bash python3 scripts/timing_analyzer.py --log simulation.log --json
bash python3 scripts/scaling_analyzer.py --data scaling.json --type strong --json
bash python3 scripts/bottleneck_detector.py --timing timing.json --scaling scaling.json --json
| Scenario | Meaning | Action | |----------|---------|--------| | Solver >70% | Solver-dominated | Tune preconditioner, check tolerance | | Assembly >50% | Assembly-dominated | Cache matrices, vectorize, parallelize | | I/O >30% | I/O-dominated | Reduce frequency, use parallel I/O | | Balanced (<30% each) | Well-balanced | Look for algorithmic improvements |
| Efficiency | Meaning | Action | |------------|---------|--------| | >0.80 | Excellent scaling | Continue scaling up | | 0.70-0.80 | Good scaling | Monitor at larger scales | | 0.50-0.70 | Poor scaling | Investigate communication/load balance | | <0.50 | Very poor scaling | Reduce processor count or redesign |
| Usage | Meaning | Action | |-------|---------|--------| | <60% available | Safe | No action needed | | 60-80% available | Moderate | Monitor, consider optimization | | >80% available | High | Reduce resolution or increase processors | | >100% available | Exceeds capacity | Must reduce problem size |
| Error | Cause | Resolution | |-------|-------|------------| | Log file not found | Invalid path | Verify log file path | | No timing data found | Pattern mismatch | Provide custom pattern with --pattern | | At least 2 runs required | Insufficient data | Provide more scaling runs | | Missing required parameters | Incomplete params | Add mesh and fields to params file |
references/profiling_guide.md - Profiling concepts and interpretationreferences/optimization_strategies.md - Detailed optimization approaches| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +41 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.