You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jamie Wong edited this page Feb 15, 2019
·
2 revisions
stackprof is a sampling call-stack profiler for Ruby.
To record a profile, wrap your code in a StackProf.run block with raw: true, then save the JSON encoded version of the profile to a file. You'll need to be running stackprof >= 0.2.11.
require'json'require'stackprof'profile=StackProf.run(mode: :wall,raw: true)do# Do your thing hereendFile.write('stackprof.json',JSON.generate(profile))