astrofrog / psrecord

Record the CPU and memory activity of a process :chart_with_upwards_trend:
BSD 2-Clause "Simplified" License
595 stars 77 forks source link

Fix compatibility with latest psutil version #15

Closed astrofrog closed 7 years ago

astrofrog commented 9 years ago

get_cpu_percent is now cpu_percent

joezuntz commented 7 years ago

Just a reminder about this issue which just hit me and looks like it shouldn't be too bad to fix!

saimn commented 7 years ago

@astrofrog - I fixed that on my local copy last week, to be able to use psutil, but I forgot to open a PR ! I can push that later today.

astrofrog commented 7 years ago

It seems to work for me with the latest dev version, and was going to do another release now.

@saimn - what kind of changes did you have to make?

saimn commented 7 years ago

@astrofrog - https://github.com/saimn/psrecord/commit/b6d2720992c8edc5897d969a112552bae65b2333 I pushed very quickly as I have to go. I had to use children instead of get_children and changes to get cpu/mem from subprocesses.

astrofrog commented 7 years ago

Thanks!

astrofrog commented 7 years ago

@saimn - thanks, I've included your fixes in https://github.com/astrofrog/psrecord/pull/19, and added some tests for better coverage.

astrofrog commented 7 years ago

@joezuntz - the latest developer version should now work correctly (thanks to @saimn's fix). Can you confirm that this is the case? I'm planning on doing a release once the Travis OSX builds work again and I'm able to confirm that this all works fine from a CI point of view.

saimn commented 7 years ago

@astrofrog - thanks !

joezuntz commented 7 years ago

Yep, works for me now - thanks!

astrofrog commented 7 years ago

@joezuntz - thanks for confirming! psrecord 1.0 is now out, so closing this.