Skip to content

Commit

Permalink
Metrics::Memory measures in fractional KB also
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Jun 16, 2008
1 parent 49d1951 commit ed67d90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions activesupport/lib/active_support/testing/performance.rb
Expand Up @@ -285,15 +285,15 @@ class Memory < Base

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

Expand Down

0 comments on commit ed67d90

Please sign in to comment.