Last active
October 27, 2018 10:06
-
-
Save benoittgt/7b67585b78028c8595fdf938540c7da3 to your computer and use it in GitHub Desktop.
Graph process consumption with psrecord
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
child_pid = spawn "psrecord #{Process.pid} --plot plot_#{Time.now.strftime('%H_%M_%S')}.png" | |
a = [] | |
10_000_000.times { |i| a << i.to_s } | |
puts Process.kill('SIGINT', child_pid) | |
puts "continue scripting" |
Author
benoittgt
commented
Oct 26, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment