aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing/performance/ruby/mri.rb
diff options
context:
space:
mode:
authorGonçalo Silva <goncalossilva@gmail.com>2011-03-25 19:03:59 +0000
committerGonçalo Silva <goncalossilva@gmail.com>2011-03-25 19:10:47 +0000
commit278344b3fab67fcc471f475992a86c3748a83e23 (patch)
treea9f2c6dcfcad3ceaeb22d43c5cbbcd9bb52ac88d /activesupport/lib/active_support/testing/performance/ruby/mri.rb
parent417b2baf0fafc48dbfdab8a81b15836599a0613e (diff)
downloadrails-278344b3fab67fcc471f475992a86c3748a83e23.tar.gz
rails-278344b3fab67fcc471f475992a86c3748a83e23.tar.bz2
rails-278344b3fab67fcc471f475992a86c3748a83e23.zip
fixed time and size units (should be seconds / bytes), fixed typo when counting memory allocations under rubinius
Diffstat (limited to 'activesupport/lib/active_support/testing/performance/ruby/mri.rb')
-rw-r--r--activesupport/lib/active_support/testing/performance/ruby/mri.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/testing/performance/ruby/mri.rb b/activesupport/lib/active_support/testing/performance/ruby/mri.rb
index d12482b58f..5fa0269b6a 100644
--- a/activesupport/lib/active_support/testing/performance/ruby/mri.rb
+++ b/activesupport/lib/active_support/testing/performance/ruby/mri.rb
@@ -19,7 +19,7 @@ module ActiveSupport
# Ruby 1.8 + ruby-prof wrapper
if RubyProf.respond_to?(:measure_memory)
def measure
- RubyProf.measure_memory / 1024.0
+ RubyProf.measure_memory
end
end
end
@@ -48,7 +48,7 @@ module ActiveSupport
# Ruby 1.8 + ruby-prof wrapper
if RubyProf.respond_to?(:measure_gc_time)
def measure
- RubyProf.measure_gc_time / 1000
+ RubyProf.measure_gc_time / 1000.0 / 1000.0
end
end
end