diff options
author | José Valim <jose.valim@gmail.com> | 2011-12-20 18:22:21 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-20 18:22:21 +0100 |
commit | 7ab47751068c6480e7e44fc9265a7e690dd4af3b (patch) | |
tree | 256b236f0d37625f9d74af4d4280a4673fb4f805 /activesupport/lib/active_support/testing/performance/ruby | |
parent | 51095be1b08b1dd2a8a049f009bac6220fa7a68b (diff) | |
download | rails-7ab47751068c6480e7e44fc9265a7e690dd4af3b.tar.gz rails-7ab47751068c6480e7e44fc9265a7e690dd4af3b.tar.bz2 rails-7ab47751068c6480e7e44fc9265a7e690dd4af3b.zip |
Initial pass at removing dead 1.8.x code from Active Support.
There are a bunch of other implicit branches that adds
1.8.x specific code that still needs to be removed. Pull
requests for those cases are welcome.
Diffstat (limited to 'activesupport/lib/active_support/testing/performance/ruby')
-rw-r--r-- | activesupport/lib/active_support/testing/performance/ruby/mri.rb | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/activesupport/lib/active_support/testing/performance/ruby/mri.rb b/activesupport/lib/active_support/testing/performance/ruby/mri.rb deleted file mode 100644 index 142279dd6e..0000000000 --- a/activesupport/lib/active_support/testing/performance/ruby/mri.rb +++ /dev/null @@ -1,57 +0,0 @@ -module ActiveSupport - module Testing - module Performance - module Metrics - class Base - protected - # Ruby 1.8 + ruby-prof wrapper (enable/disable stats for Benchmarker) - if GC.respond_to?(:enable_stats) - def with_gc_stats - GC.enable_stats - GC.start - yield - ensure - GC.disable_stats - end - end - end - - class Memory < DigitalInformationUnit - # Ruby 1.8 + ruby-prof wrapper - if RubyProf.respond_to?(:measure_memory) - def measure - RubyProf.measure_memory - end - end - end - - class Objects < Amount - # Ruby 1.8 + ruby-prof wrapper - if RubyProf.respond_to?(:measure_allocations) - def measure - RubyProf.measure_allocations - end - end - end - - class GcRuns < Amount - # Ruby 1.8 + ruby-prof wrapper - if RubyProf.respond_to?(:measure_gc_runs) - def measure - RubyProf.measure_gc_runs - end - end - end - - class GcTime < Time - # Ruby 1.8 + ruby-prof wrapper - if RubyProf.respond_to?(:measure_gc_time) - def measure - RubyProf.measure_gc_time / 1000.0 / 1000.0 - end - end - end - end - end - end -end |