Created
July 4, 2012 07:05
-
-
Save iagooar/3045819 to your computer and use it in GitHub Desktop.
Revisions
-
iagooar revised this gist
Oct 3, 2013 . 1 changed file with 2 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,7 @@ # Disclaimer: this solution has been taken from the post: http://stackoverflow.com/a/5071198/784270 # navigate to the bundler gem and in lib/bundler/runtime.rb, # find the line that does Kernel.require and wrap it like this puts Benchmark.measure("require #{file}") { Kernel.require file -
Mateusz Sojka revised this gist
Jul 4, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ # Add require 'benchmark' # to config/boot.rb -
Mateusz Sojka created this gist
Jul 4, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ # Disclaimer: this solution has been taken from the post: http://stackoverflow.com/a/5071198/784270 # Go to the bundler gem path and replace Kernel.require file # with puts Benchmark.measure("require #{file}") { Kernel.require file }.format("%n: %t %r") # Add 'require benchmark' # to config/boot.rb # Start the console / server to see the benchmark. # If you want to measure the total loading time of your Rails app, you can use the solution # proposed in: http://erik.debill.org/2011/02/19/ruby-start-up-times echo puts Time.now > test_script time rails runner test_script