def print_profiling_feedback(reps)
max_filter_name_length = @filter_times.keys.map { |k| k.to_s.size }.max
return if max_filter_name_length.nil?
if reps.any? { |r| !r.compiled? }
$stderr.puts
$stderr.puts "Warning: profiling information may not be accurate because " +
"some items were not compiled."
end
puts
puts ' ' * max_filter_name_length + ' | count min avg max tot'
puts '-' * max_filter_name_length + '-+-----------------------------------'
@filter_times.to_a.sort_by { |r| r[1] }.each do |row|
filter_name, samples = *row
count = samples.size
min = samples.min
tot = samples.inject { |memo, i| memo + i}
avg = tot/count
max = samples.max
count = format('%4d', count)
min = format('%4.2f', min)
avg = format('%4.2f', avg)
max = format('%4.2f', max)
tot = format('%5.2f', tot)
filter_name = format("%#{max_filter_name_length}s", filter_name)
puts "#{filter_name} | #{count} #{min}s #{avg}s #{max}s #{tot}s"
end
end