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.