astrofrog / psrecord

Record the CPU and memory activity of a process :chart_with_upwards_trend:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expose endpoint for programetic use

talhajunaidd opened this issue · comments

Is it possible to expose the monitor method to allow the use of this amazing library from Python?

Yes ! This would be really great.
Here is the PR : #54

Please note you can also use (without the PR) :

from psrecord.main import monitor
monitor(1300, logfile = "./test.log", plot="./fig.png", include_children=True)