astrofrog/psrecord — pull request #9 by saimn (2014-06-10 22:18:48+00:00)
Title: Add a psplot command to plot and compare stats from multiple runs of psrecord

This allow to compare multiple runs of psrecord on one plot. I have added a new command since it is easier than playing with argparse's sub-parsers.
It takes a list of log files from psrecord, with options to plot only mem or cpu. I don't know what is the best for colors and linestyles to distinguish easily all the lines (suggestions are welcome ;)). Currently it uses mpl's color cycle, so mem and cpu for a file will have the same color (and linestyle).
I didn't modify the plot from `main.py`, it could probably use the same code, but I'm waiting for your feedback before going further ;-).

```
usage: psplot [-h] [-m] [-c] [-o OUTPUT] [files [files ...]]

Plot stats from psrecord

positional arguments:
files List of files to plot

optional arguments:
-h, --help show this help message and exit
-m, --mem Show memory values
-c, --cpu Show cpu values
-o OUTPUT, --output OUTPUT
Save the plot to a file
```