pythonspeed / filprofiler

A Python memory profiler for data processing and scientific computing applications
https://pythonspeed.com/products/filmemoryprofiler/
Apache License 2.0
841 stars 26 forks source link

Logging the peak memory usage measurements #228

Open vsandinh opened 3 years ago

vsandinh commented 3 years ago

Hi, I need to measure the memory usage of operations on different matrix sizes. Is there a way that I can get the peak memory usage and log it into a list rather having to read it from the report and manually logging it?

Thanks for a great tool!

itamarst commented 3 years ago

Hi, you can use the API (https://pythonspeed.com/fil/docs/fil/api.html) to get graphs for different calls, but it'd still require manual extraction. I could add an API that just returns the peak memory usage, I suppose.

vsandinh commented 3 years ago

Thanks so much! It would be great if there is an API.

pmav99 commented 1 year ago

For the record, I think that the peak memory usage could also be printed in the command line when running fil-profile run ...

itamarst commented 1 year ago

@pmav99 makes sense.