Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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