mix raxol.memory.profiler (Raxol v2.0.1)

View Source

Interactive memory profiler for real-time memory analysis.

This task provides an interactive interface for profiling memory usage in real-time, allowing developers to monitor memory patterns, detect hotspots, and analyze memory allocation patterns.

Usage

mix raxol.memory.profiler
mix raxol.memory.profiler --mode live
mix raxol.memory.profiler --target Terminal.Buffer
mix raxol.memory.profiler --format dashboard

Options

  • --mode - Profiling mode (live, snapshot, trace) (default: live)
  • --target - Target module to profile (default: all)
  • --format - Output format (dashboard, text, json) (default: dashboard)
  • --interval - Update interval in seconds for live mode (default: 1)
  • --duration - Duration for profiling in seconds (default: 60)
  • --output - Output file for results
  • --threshold - Memory allocation threshold in bytes (default: 1024)

Profiling Modes

live

Real-time memory monitoring with interactive dashboard. Shows live memory usage, allocation patterns, and GC activity.

snapshot

Take memory snapshots at specific intervals and compare them. Useful for detecting memory leaks and growth patterns.

trace

Trace memory allocations and deallocations in detail. Provides detailed allocation traces and call stacks.

Output Formats

dashboard

Interactive terminal dashboard with real-time updates.

text

Plain text output suitable for logging and analysis.

json

JSON format for programmatic consumption.

Controls (Dashboard Mode)

  • q - Quit
  • r - Reset statistics
  • s - Take snapshot
  • g - Force garbage collection
  • p - Pause/Resume updates
  • ↑/↓ - Navigate through processes
  • Tab - Switch between views (Memory/Processes/GC)

Summary

Functions

Callback implementation for Mix.Task.run/1.

Functions

run(args)

@spec run(list()) :: no_return()

Callback implementation for Mix.Task.run/1.