We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Sometimes it's good to display memory and CPU consumption over time. There is a nice tool for that called psrecord + matplotlib.
Here is an example:
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"
On OSX you can also use malloc_history then process the result with R. See https://github.com/ruby/ruby/pull/2029#issuecomment-442204121
malloc_history