# bloomberg/memray

Memray is a memory profiler for Python

Repository: https://github.com/bloomberg/memray
Canonical: https://ross.abutalabs.com/products/memray
Homepage: https://bloomberg.github.io/memray/
Language: Python
License: Apache-2.0
License Family: permissive
Topics: memory, memory-leak, memory-leak-detection, memory-profiler, profiler, python, python3, hacktoberfest
Last push: 2026-08-22T16:17:54+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 84, longevity 100
- inputs: {"age_days": 1608, "days_push": 11, "days_rel": 26, "gap_med": 51, "n_releases_24m": 12}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 15204, forks 458 (observed 2026-08-28T04:11:09.387169+00:00)

## What it is
Memray is a memory profiler for Python that tracks memory allocations in Python code, native C/C++ extension modules, and the interpreter itself. It generates reports such as flame graphs, supports live profiling, and integrates with pytest to catch memory regressions.

## Use cases
- find memory leaks in a python application
- profile memory usage of python code
- track allocations in C extension modules
- generate flame graphs of memory allocations
- set memory limits per pytest test
- debug high memory usage in python service
- find allocation hotspots slowing down my program

## When to choose
- you need full call-stack attribution of allocations, including native C/C++/Rust extensions
- you want flame graphs, live tracking, or per-test memory limits in pytest
- you are debugging memory leaks or high memory usage on Linux or macOS

## When to avoid
- you need to profile on Windows or other unsupported platforms
- you only need CPU/time profiling rather than memory profiling
- you need a zero-overhead sampling profiler rather than tracing every allocation

## Facets
- artifact type: cli-tool
- maturity: active
- function: benchmarking, monitoring, developer-tools, cli
- domain: developer-tools, performance
- platform: python, cli
- tags: memory-profiler, profiling, memory-leak-detection, flame-graphs, pytest-plugin, native-extensions, command-line, linux, macos

## Member repositories
- bloomberg/memray (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:09.387169+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:06:33.417677+00:00, confidence not recorded.
  - readme: https://github.com/bloomberg/memray (fetched 2026-08-28T04:11:09.387169+00:00, sha 5e446ce6151c)
  - homepage: https://bloomberg.github.io/memray/ (fetched 2026-08-29T08:04:28.160692+00:00, sha 70f786b6b11d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
