1.7 KiB
1.7 KiB
Memory Profiler Templates
Ready-to-use templates for memory profiling reports and heap snapshot analysis.
Templates Overview
Memory Investigation Report
File: memory-report-template.md
Template for documenting memory leak investigations:
- Incident Summary: Timeline, symptoms, impact
- Investigation Steps: Tools used, findings
- Root Cause: Code analysis, leak pattern identified
- Fix Implementation: Code changes, validation
- Results: Before/after metrics
Use when: Documenting memory leak investigations for team/postmortems
Heap Snapshot Analysis Checklist
File: heap-snapshot-analysis.md
Step-by-step checklist for analyzing V8 heap snapshots:
- Snapshot Collection: When/how to capture snapshots
- Comparison Analysis: Finding leaks by comparing snapshots
- Retainer Analysis: Understanding why objects not GC'd
- Common Patterns: EventEmitter, closures, timers
Use when: Analyzing heap snapshots in Chrome DevTools
Quick Usage
Memory Report
- Copy template:
cp templates/memory-report-template.md docs/investigations/memory-leak-YYYY-MM-DD.md - Fill in sections as you investigate
- Share with team for review
Heap Analysis
- Open template:
templates/heap-snapshot-analysis.md - Follow checklist step-by-step
- Document findings in memory report
Related Documentation
- Examples: Examples Index - Full investigation examples
- Reference: Reference Index - Pattern catalog
- Main Agent: memory-profiler.md - Memory profiler agent
Return to main agent