Created
July 14, 2012 22:36
-
-
Save harley/3113715 to your computer and use it in GitHub Desktop.
Revisions
-
Harley Trung renamed this gist
Jul 14, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Harley Trung revised this gist
Jul 14, 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 @@ -1,4 +1,4 @@ # Put this in Rakefile (doesn't matter where) require 'benchmark' class Rake::Task -
Harley Trung revised this gist
Jul 14, 2012 . 1 changed file with 4 additions and 2 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 @@ -6,5 +6,7 @@ class Rake::Task bm = Benchmark.measure { execute_without_benchmark(*args) } puts " #{name} --> #{bm}" end alias_method :execute_without_benchmark, :execute alias_method :execute, :execute_with_benchmark end -
Harley Trung created this gist
Jul 14, 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,10 @@ # Put this at the end of Rakefile require 'benchmark' class Rake::Task def execute_with_benchmark(*args) bm = Benchmark.measure { execute_without_benchmark(*args) } puts " #{name} --> #{bm}" end alias_method_chain :execute, :benchmark end