What problem does it solve?
It helps you pinpoint where and when a Python program allocates memory so you can diagnose leaks, spikes, or inefficient allocation patterns instead of guessing.
Core Features & Use Cases
- Profile memory over time: Use temporal flamegraphs to understand allocation behavior across the run, not just peak usage.
- Generate a browser-friendly report: Produce an interactive HTML flamegraph from a recorded allocation trace.
- Practical debugging workflow: Compare reports between runs to validate whether changes reduced churn or leaks.
Use Case: You run a data processing script in spatial omics and suspect memory growth during specific steps; this skill profiles allocations and visualizes where the memory pressure originates.
Quick Start
Profile your script by running it with the memray-run step (for example: pixi run -e profiling memray-run your_script.py).