Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added support for more printers

  • Loading branch information...
commit d9b77ddecde431d3190c7e08d73e26055a667597 1 parent 6f88b82
@goncalossilva goncalossilva authored wycats committed
Showing with 9 additions and 5 deletions.
  1. +9 −5 activesupport/lib/active_support/testing/performance.rb
View
14 activesupport/lib/active_support/testing/performance.rb
@@ -178,7 +178,7 @@ def run
RubyProf.pause
profile_options[:runs].to_i.times { run_test(@metric, :profile) }
@data = RubyProf.stop
- @total = @data.threads.values.sum(0) { |method_infos| method_infos.sort.last.total_time }
+ @total = @data.threads.values.sum(0) { |method_infos| method_infos.max.total_time }
end
def report
@@ -207,10 +207,14 @@ def record
def output_filename(printer_class)
suffix =
case printer_class.name.demodulize
- when 'FlatPrinter'; 'flat.txt'
- when 'GraphPrinter'; 'graph.txt'
- when 'GraphHtmlPrinter'; 'graph.html'
- when 'CallTreePrinter'; 'tree.txt'
+ when 'FlatPrinter'; 'flat.txt'
+ when 'FlatPrinterWithLineNumbers'; 'flat_line_numbers.txt'
+ when 'GraphPrinter'; 'graph.txt'
+ when 'GraphHtmlPrinter'; 'graph.html'
+ when 'GraphYamlPrinter'; 'graph.yml'
+ when 'CallTreePrinter'; 'tree.txt'
+ when 'CallStackPrinter'; 'stack.html'
+ when 'DotPrinter'; 'graph.dot'
else printer_class.name.sub(/Printer$/, '').underscore
end
Please sign in to comment.
Something went wrong with that request. Please try again.