-
-
Save shotgundebugging/e6dd0114d9ad90fa0fee88598b460d88 to your computer and use it in GitHub Desktop.
This file contains hidden or 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