diff options
author | Gonçalo Silva <goncalossilva@gmail.com> | 2010-06-12 11:45:31 +0100 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-06-17 19:18:52 -0700 |
commit | 36f5d09692bbc7adeef8944530fbf03c8cbe93ea (patch) | |
tree | 44150539496256ce303656469b41e51c2235fc74 /activesupport/lib | |
parent | cb74cfc9c1c95805fac4f0ff6b9f1465a8bf9d64 (diff) | |
download | rails-36f5d09692bbc7adeef8944530fbf03c8cbe93ea.tar.gz rails-36f5d09692bbc7adeef8944530fbf03c8cbe93ea.tar.bz2 rails-36f5d09692bbc7adeef8944530fbf03c8cbe93ea.zip |
removed support for 1.8's GC alternative hacks (railsbench and lloyd patches). RubyProf can handle it
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/testing/performance.rb | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb index cd5f4fc62a..2cdac12391 100644 --- a/activesupport/lib/active_support/testing/performance.rb +++ b/activesupport/lib/active_support/testing/performance.rb @@ -270,13 +270,6 @@ begin GC::Profiler.disable GC.enable end - elsif GC.respond_to?(:enable_stats) - def with_gc_stats - GC.enable_stats - yield - ensure - GC.disable_stats - end else def with_gc_stats yield @@ -347,18 +340,6 @@ begin RubyProf.measure_memory / 1024.0 end - # Ruby 1.8 + railsbench patch - elsif GC.respond_to?(:allocated_size) - def measure - GC.allocated_size / 1024.0 - end - - # Ruby 1.8 + lloyd patch - elsif GC.respond_to?(:heap_info) - def measure - GC.heap_info['heap_current_memory'] / 1024.0 - end - # Ruby 1.9 with total_malloc_allocated_size patch elsif GC.respond_to?(:malloc_total_allocated_size) def measure @@ -395,12 +376,6 @@ begin def measure RubyProf.measure_allocations end - - # Ruby 1.8 + railsbench patch - elsif ObjectSpace.respond_to?(:allocated_objects) - def measure - ObjectSpace.allocated_objects - end end def format(measurement) |