← スキル一覧に戻る

profile-code
by mvillmow
Training framework written in Mojo
⭐ 11🍴 4📅 2026年1月24日
SKILL.md
name: profile-code description: "Measure execution time and memory usage of code. Use when analyzing performance characteristics." mcp_fallback: none category: analysis tier: 2 user-invocable: false
Profile Code
Use profiling tools to measure CPU time, memory allocation, and identify performance bottlenecks in code.
When to Use
- Finding performance bottlenecks
- Measuring CPU vs memory tradeoffs
- Understanding where code spends most time
- Optimizing hot code paths
Quick Reference
# Python CPU profiling with cProfile
python3 -m cProfile -s cumulative script.py | head -30
# Memory profiling
pip install memory-profiler
python3 -m memory_profiler script.py
# Detailed call graph
pip install graphviz
python3 -m pstats /tmp/profile.prof
Workflow
- Select profiler: Choose appropriate tool (cProfile for CPU, memory_profiler for memory)
- Run with instrumentation: Execute code with profiling enabled
- Capture metrics: Record timing and memory data
- Analyze output: Identify top time consumers and memory hogs
- Report findings: Document bottlenecks with before/after context
Output Format
Profiling report:
- Top functions by execution time
- Call count for each function
- Memory allocation per function
- Call graph/call tree
- Percentage of total time/memory per function
- Recommendations for optimization
References
- See
suggest-optimizationsskill for improvement recommendations - See
benchmark-functionsskill for measuring improvements - See CLAUDE.md > Performance for optimization guidelines
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です