Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Importing from stackprof (ruby)
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.
require 'json' require 'stackprof' profile = StackProf.run(mode: :wall, raw: true) do # Do your thing here end File.write('stackprof.json', JSON.generate(profile))
Then drop the resulting
stackprof.json into https://www.speedscope.app/
To view it offline, you'll need to install speedscope via
npm install -g speedscope
Then you should be able to open it like so: