aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-06-16 00:10:30 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-06-16 00:10:30 -0700
commited67d90a9874df2e42d6045d47e805b3e594d718 (patch)
treef233a36a858113d8fa5a6b7c73a4433f30d79656 /activesupport/lib/active_support
parent49d19515b70a13f62127895301bd2a2d681135b9 (diff)
downloadrails-ed67d90a9874df2e42d6045d47e805b3e594d718.tar.gz
rails-ed67d90a9874df2e42d6045d47e805b3e594d718.tar.bz2
rails-ed67d90a9874df2e42d6045d47e805b3e594d718.zip
Metrics::Memory measures in fractional KB also
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/testing/performance.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb
index 377150a0a6..7da2f6791a 100644
--- a/activesupport/lib/active_support/testing/performance.rb
+++ b/activesupport/lib/active_support/testing/performance.rb
@@ -285,15 +285,15 @@ module ActiveSupport
if RubyProf.respond_to?(:measure_memory)
def measure
- RubyProf.measure_memory
+ RubyProf.measure_memory / 1024.0
end
elsif GC.respond_to?(:allocated_size)
def measure
- GC.allocated_size
+ GC.allocated_size / 1024.0
end
elsif GC.respond_to?(:malloc_allocated_size)
def measure
- GC.malloc_allocated_size
+ GC.malloc_allocated_size / 1024.0
end
end