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.
Install with Tessl CLI
npx tessl i github:ArabelaTso/Skills-4-SE --skill interval-profiling-performance-analyzer87
Does it follow best practices?
If you maintain this skill, you can automatically optimize it using the tessl CLI to improve its score:
npx tessl skill review --optimize ./path/to/skillValidation for skill structure
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.pyJava example:
python scripts/profile_java.py MainClass ./bin 30
# Arguments: MainClass, classpath, duration_secondsC/C++ example:
python scripts/profile_cpp.py ./program --tool perf
# Or use gprof (requires compilation with -pg):
python scripts/profile_cpp.py ./program --tool gprofAll scripts generate profile_results.json containing:
Create interactive HTML report and flame graph data:
python scripts/generate_visualization.py profile_results.json profile_report.htmlOutputs:
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":
c1fb172
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.