diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-05-13 14:30:06 -0700 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-05-13 14:30:06 -0700 |
commit | 60de8010609ac7ac78fc19fa60b4d5805b4e511f (patch) | |
tree | d37e56bf5bb79650761039cb4b07a856644fc1fa | |
parent | 116ab8f358afd95d5b4f66772e8da35d09a27623 (diff) | |
parent | 22e31774b1e5cd6bcf00bce272fb2ebc4307a0f3 (diff) | |
download | rails-60de8010609ac7ac78fc19fa60b4d5805b4e511f.tar.gz rails-60de8010609ac7ac78fc19fa60b4d5805b4e511f.tar.bz2 rails-60de8010609ac7ac78fc19fa60b4d5805b4e511f.zip |
Merge pull request #6305 from arunagw/ruby-prof-fixes
Ruby prof fixes
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/testing/performance.rb | 1 | ||||
-rw-r--r-- | activesupport/lib/active_support/testing/performance/ruby.rb | 2 |
3 files changed, 3 insertions, 2 deletions
@@ -50,7 +50,7 @@ instance_eval File.read local_gemfile if File.exists? local_gemfile platforms :mri do group :test do - gem 'ruby-prof', '0.10.8' + gem 'ruby-prof', '~> 0.11.2' end end diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb index f6bf0318f7..5048c4a0d0 100644 --- a/activesupport/lib/active_support/testing/performance.rb +++ b/activesupport/lib/active_support/testing/performance.rb @@ -196,6 +196,7 @@ module ActiveSupport class Base include ActionView::Helpers::NumberHelper + include ActionView::Helpers::OutputSafetyHelper attr_reader :total diff --git a/activesupport/lib/active_support/testing/performance/ruby.rb b/activesupport/lib/active_support/testing/performance/ruby.rb index b7a34ea279..1104fc0a03 100644 --- a/activesupport/lib/active_support/testing/performance/ruby.rb +++ b/activesupport/lib/active_support/testing/performance/ruby.rb @@ -36,7 +36,7 @@ module ActiveSupport RubyProf.pause full_profile_options[:runs].to_i.times { run_test(@metric, :profile) } @data = RubyProf.stop - @total = @data.threads.values.sum(0) { |method_infos| method_infos.max.total_time } + @total = @data.threads.sum(0) { |thread| thread.methods.max.total_time } end def record |