Skip to content

Instantly share code, notes, and snippets.

@gmarik
Last active June 22, 2020 03:23
Show Gist options
  • Save gmarik/809655 to your computer and use it in GitHub Desktop.
Save gmarik/809655 to your computer and use it in GitHub Desktop.
module Kernel
alias require_orig_bench require
def require(*args)
from = Time.now.to_f
$__deep ||= 0; $__deep += 1
require_orig_bench(*args)
$stderr.puts %Q[ #{" " * ($__deep - 1) } #{(Time.now.to_f - from)} in #{args.inspect} ]
$__deep -= 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment