Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Created August 14, 2023 00:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tenderlove/6737ca556565aae0acbc0797dcaa8262 to your computer and use it in GitHub Desktop.
Save tenderlove/6737ca556565aae0acbc0797dcaa8262 to your computer and use it in GitHub Desktop.
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