# Memray - 블룸버그가 공개한 Python 메모리 프로파일러 오픈소스

> Clean Markdown view of GeekNews topic #6417. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=6417](https://news.hada.io/topic?id=6417)
- GeekNews Markdown: [https://news.hada.io/topic/6417.md](https://news.hada.io/topic/6417.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2022-04-22T09:33:41+09:00
- Updated: 2022-04-22T09:33:41+09:00
- Original source: [github.com/bloomberg](https://github.com/bloomberg/memray)
- Points: 14
- Comments: 1

## Topic Body

- 파이썬 코드의 네이티브 확장이나 인터프리터 내부까지 메모리 할당을 추적하고, 메모리 사용에 관한 다양한 리포트를 작성  
- CLI 도구 또는 라이브러리로 사용 가능   
- 주요 기능   
  - 샘플링이 아닌 모든 함수 호출을 추적   
  - C/C++ 라이브러리의 네이티브 호출까지 처리   
  - 매우 빨라서 속도 저하를 최소화. 네이티브 코드 추적은 조금 느리지만 필요에 따라 활성화/비활성화 가능   
  - Flame 그래프 같은 다양한 메모리 사용량 리포트 생성   
  - 파이썬 쓰레드 지원   
  - 네이티브 쓰레드 지원(C확장의 C++ 쓰레드)  
- 이런 문제 해결에 도움   
  - 메모리를 많이 쓰는 원인을 파악  
  - 메모리 Leak 찾기   
  - 코드에서 많은 할당을 일으키는 핫스팟 찾기   
- 리눅스만 지원

## Comments



### Comment 9815

- Author: xguru
- Created: 2022-04-22T09:41:03+09:00
- Points: 2

EdgeDB 의 CEO가 스크린샷과 함께 장점들을 정리한 트윗  
https://twitter.com/1st1/status/1516859294896906241
