1

I need to add some lines to my code that shows the maximum memory that has been used in the runtime of the code. My code opens a CSV file and processes it and write a new CSV file. I need to know the maximum memory that has been allocated throughout the time of running.

I need this to compare different alternatives in terms of memory usage. I have tried memory_usage() and df.memory_usage(deep=True).max() but I don't know what is the numbers they generate.

I need to know that for example: this code to process this CSV file has allocated (for example) 12 MB of RAM in the most-memory-consuming-moment of runtime.

Mahdi
  • 11
  • 3
  • If you're on a UNIX-like system, this is basically a duplicate of [Peak memory usage of a linux/unix process](https://stackoverflow.com/q/774556/364696). – ShadowRanger Jul 04 '19 at 00:22

0 Answers0