Skip to content

Instantly share code, notes, and snippets.

@benoittgt
Last active October 27, 2018 10:06
Show Gist options
  • Save benoittgt/7b67585b78028c8595fdf938540c7da3 to your computer and use it in GitHub Desktop.
Save benoittgt/7b67585b78028c8595fdf938540c7da3 to your computer and use it in GitHub Desktop.
Graph process consumption with psrecord
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"
@benoittgt
Copy link
Author

plot_21_43_27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment