https://github.com/ericchiang/memplot
Plot the memory usage of arbitrary processes
https://github.com/ericchiang/memplot
Last synced: about 1 year ago
JSON representation
Plot the memory usage of arbitrary processes
- Host: GitHub
- URL: https://github.com/ericchiang/memplot
- Owner: ericchiang
- Created: 2014-05-30T02:36:26.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2020-03-12T17:03:34.000Z (over 6 years ago)
- Last Synced: 2025-03-25T08:51:17.334Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 122 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
memplot
=======
Plot the memory usage of arbitrary processes
Install
-------
pypi:
```bash
$ pip install memplot
```
From source:
```bash
$ 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`
```python
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:
```bash
$ memplot python pickle_array.py
```
This command produces the following plot:

How does R do? Here's a similar serialization script saved as `save_array.r`
```Rscript
x <- matrix(rnorm(1000,10000),1000,10000)
Sys.sleep(1)
save(x,file="x.Rdata")
```
Time to plot the memory usage:
```bash
$ memplot Rscript save_array.r
```
