Skip to content

Instantly share code, notes, and snippets.

@softr8
Created October 18, 2013 15:49
Show Gist options
  • Save softr8/7043527 to your computer and use it in GitHub Desktop.
Save softr8/7043527 to your computer and use it in GitHub Desktop.
Measure gem loading time with bundler, add this at the top of your application.rb
if ENV['DEBUG_GEMLOADING']
Bundler::Runtime.class_eval do
def Kernel.require file
puts Benchmark.measure("#{file}") {
super
}.format("%t - %n: %r")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment