Skip to content

Instantly share code, notes, and snippets.

@gizmomogwai
Created June 8, 2011 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gizmomogwai/1014032 to your computer and use it in GitHub Desktop.
Save gizmomogwai/1014032 to your computer and use it in GitHub Desktop.
measurement of progresslistener
require 'benchmark'
class ProgressListener
def initialize
s = Benchmark.bm do |x|
x.report('ProgressListener.initialize') do
@todo = 0.0
@needed_tasks = {}
Rake::application.top_level_tasks.each do |name|
tasks = find_tasks_for_toplevel_task(name)
tasks.each do |t|
walk_task(t)
end
end
@progress = ProgressBar.new('all tasks', @todo)
@progress.title_width = 30
@progress.unblock
end
end
puts s
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment