memplot

Plot the mememory usage of a process


License
MIT
Install
pip install memplot==0.3.0

Documentation

memplot

Plot the memory usage of arbitrary processes

Install

pypi:

$ pip install memplot

From source:

$ git clone https://github.com/EricChiang/memplot.git
$ cd memplot
$ python setup.py install

Usage

What's the memory usage of the pickle package? Let's consider the following script save under pickle_array.py

import numpy as np
import pickle
import time

x = np.random.randn(1000,10000)
time.sleep(1)
pickle.dump(x,open("x.pk","w"))

To plot memory usage run:

$ memplot python pickle_array.py

This command produces the following plot: pickle an array

How does R do? Here's a similar serialization script saved as save_array.r

x <- matrix(rnorm(1000,10000),1000,10000)
Sys.sleep(1)
save(x,file="x.Rdata")

Time to plot the memory usage:

$ memplot Rscript save_array.r

save an array