mix raxol.memory.debug (Raxol v2.0.1)
View SourceMemory debugging tools for detecting leaks, hotspots, and optimization opportunities.
This task provides comprehensive memory debugging capabilities including leak detection, hotspot analysis, allocation tracking, and optimization guidance.
Usage
mix raxol.memory.debug
mix raxol.memory.debug --command analyze
mix raxol.memory.debug --command hotspots
mix raxol.memory.debug --command leaksCommands
analyze
Comprehensive memory analysis including:
- Current memory usage breakdown
- Process memory consumption
- ETS table analysis
- Binary reference analysis
- Potential optimization opportunities
hotspots
Identify memory hotspots:
- Top memory-consuming processes
- Large ETS tables
- Binary memory usage
- Atom table growth
- Port memory usage
leaks
Memory leak detection:
- Process memory growth monitoring
- Reference leak detection
- ETS table growth analysis
- Binary accumulation detection
- Port leak detection
optimize
Memory optimization guidance:
- Recommend memory optimizations
- Identify inefficient patterns
- Suggest configuration changes
- Binary optimization tips
- Process pool recommendations
Options
--command- Debug command to run (analyze, hotspots, leaks, optimize)--target- Target module or process to focus on--threshold- Memory threshold in MB for reporting (default: 1)--output- Output file for detailed results--format- Output format (text, json, markdown) (default: text)--monitoring-duration- Duration for leak monitoring in seconds (default: 300)
Examples
# General memory analysis
mix raxol.memory.debug --command analyze
# Find memory hotspots
mix raxol.memory.debug --command hotspots --threshold 5
# Monitor for memory leaks for 10 minutes
mix raxol.memory.debug --command leaks --monitoring-duration 600
# Get optimization recommendations
mix raxol.memory.debug --command optimize --output memory_report.md
Summary
Functions
Callback implementation for Mix.Task.run/1.
Functions
Callback implementation for Mix.Task.run/1.