-
-
Save shotgundebugging/9ca9fee8862d48708147904a8a8199cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
profiler = Thread.new do | |
while true | |
p Thread.main.backtrace | |
sleep 0.5 | |
end | |
end | |
def slow_function | |
sleep 2 | |
end | |
def calls_slow | |
sleep 1 | |
slow_function | |
sleep 7 | |
end | |
sleep 2 | |
calls_slow | |
sleep 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment