bloomberg / memray

Memray is a memory profiler for Python
https://bloomberg.github.io/memray/
Apache License 2.0
13.17k stars 392 forks source link

AGGREGATED_ALLOCATIONS for process attach? #405

Closed leiwen83 closed 1 year ago

leiwen83 commented 1 year ago

Is there an existing proposal for this?

Is your feature request related to a problem?

Some long running process may encounter sudden memory surf at unclear time point, so it would helps a lot it memray could attach to some abnormal process and use AGGREGATED_ALLOCATIONS mode.

Describe the solution you'd like

Since AGGREGATED_ALLOCATIONS mode would help reduce the long running process recording size, and current limitation is it shall be written when recording is off. Then how about set kind of signal receive mechanism, or socket?, so that outsider could notify AGGREGATED_ALLOCATIONS recording gracefully shutdown itself?

Alternatives you considered

No response

pablogsal commented 1 year ago

Fixed by https://github.com/bloomberg/memray/pull/455