diff options
author | Gonçalo Silva <goncalossilva@gmail.com> | 2010-08-10 18:21:51 +0100 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-08-10 10:23:40 -0700 |
commit | 58add1b63cd2b5685d5ac22615070cd29123d3cd (patch) | |
tree | 508dc1aa1e04299d05608cb9ba72caee2cca840d /activesupport/lib/active_support/testing | |
parent | e86cced311539932420f9cda49d736606d106c28 (diff) | |
download | rails-58add1b63cd2b5685d5ac22615070cd29123d3cd.tar.gz rails-58add1b63cd2b5685d5ac22615070cd29123d3cd.tar.bz2 rails-58add1b63cd2b5685d5ac22615070cd29123d3cd.zip |
added support for more printers
Diffstat (limited to 'activesupport/lib/active_support/testing')
-rw-r--r-- | activesupport/lib/active_support/testing/performance.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb index a124c6e0ca..f7ddf6421d 100644 --- a/activesupport/lib/active_support/testing/performance.rb +++ b/activesupport/lib/active_support/testing/performance.rb @@ -178,7 +178,7 @@ begin 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 @@ begin 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 |