Skip to content

Instantly share code, notes, and snippets.

@jhsu
Created February 9, 2010 19:15
Show Gist options
  • Save jhsu/299552 to your computer and use it in GitHub Desktop.
Save jhsu/299552 to your computer and use it in GitHub Desktop.
require 'benchmark'
class Rake::Task
def execute_with_benchmark(*args)
bench = Benchmark.measure do
execute_without_benchmark(*args)
end
puts "\n #{name} --> #{bench}"
end
alias_method_chain :execute, :benchmark
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment