Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
require 'rack-mini-profiler'
require 'flamegraph'
require 'stackprof'
def a
puts "method a started!"
sleep 0.5
puts "method a ended!"
end
def b
puts "method b started!"
sleep 0.5
d
sleep 0.5
puts "method b ended!"
end
def c
puts "method c started!"
sleep 0.5
puts "method c ended!"
end
def d
puts "method d started!"
sleep 0.5
e
sleep 0.5
e
sleep 0.5
puts "method d ended!"
end
def e
puts "method e started!"
sleep 0.5
puts "method e ended!"
end
Flamegraph.generate("flamegraph.test.html") do
a
b
c
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.