Created
August 14, 2023 00:57
-
-
Save tenderlove/6737ca556565aae0acbc0797dcaa8262 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