arabelatso/interval-profiling-performance-analyzer
Profile programs at the function/method level to identify performance hotspots, bottlenecks, and optimization opportunities. Records execution time, memory usage, and call frequency for each interval. Generates actionable recommendations and visualizations. Use when users need to (1) analyze program performance, (2) identify slow functions or bottlenecks, (3) optimize execution time or memory usage, (4) profile Python, Java, or C/C++ programs with test cases or workload scenarios, or (5) generate performance reports with flame graphs and recommendations.
npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill interval-profiling-performance-analyzer
Profile programs to identify performance bottlenecks and generate optimization recommendations with visualizations.
Clarify the profiling task:
Choose based on language and environment:
Python:
scripts/profile_python.py (cProfile + tracemalloc)Java:
scripts/profile_java.py (Java Flight Recorder)C/C++:
scripts/profile_cpp.py (perf or gprof)perf: Linux only, no recompilation neededgprof: Cross-platform, requires -pg compilation flagFor detailed tool information, see references/profiling-tools.md.
Execute the appropriate profiling script:
Python example:
python scripts/profile_python.py target_script.py
Java example:
python scripts/profile_java.py MainClass ./bin 30
# Arguments: MainClass, classpath, duration_seconds
C/C++ example:
python scripts/profile_cpp.py ./program --tool perf
# Or use gprof (requires compilation with -pg):
python scripts/profile_cpp.py ./program --tool gprof
All scripts generate profile_results.json containing:
Create interactive HTML report and flame graph data:
python scripts/generate_visualization.py profile_results.json profile_report.html
Outputs:
profile_report.html: Interactive report with charts and recommendationsflamegraph.txt: Data for flame graph generation (use flamegraph.pl if available)Review the generated report:
Hotspots section: Functions consuming the most time
Recommendations section: Specific suggestions for each hotspot
Memory usage: Identify memory-intensive operations
Summarize findings for the user:
Reference references/optimization-patterns.md for detailed optimization techniques.
User wants to know "why is my program slow?"
User wants to verify optimization effectiveness.
before.jsonafter.jsonUser suspects memory issues.
User wants to profile different workloads.
-g flag for function namessudo for system-wide profiling-pg flag"perf not found" (C/C++):
sudo apt-get install linux-tools-generic
"JFR file not created" (Java):
"No profiling data" (any language):
"Flame graph not generating":
Take arabelatso/interval-profiling-performance-analyzer from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference apt.
Without those the skill loads but fails at the first command.