diff options
Diffstat (limited to 'activesupport/lib/active_support/testing/performance/ruby')
-rw-r--r-- | activesupport/lib/active_support/testing/performance/ruby/mri.rb | 10 | ||||
-rw-r--r-- | activesupport/lib/active_support/testing/performance/ruby/yarv.rb | 8 |
2 files changed, 8 insertions, 10 deletions
diff --git a/activesupport/lib/active_support/testing/performance/ruby/mri.rb b/activesupport/lib/active_support/testing/performance/ruby/mri.rb index 86e650050b..142279dd6e 100644 --- a/activesupport/lib/active_support/testing/performance/ruby/mri.rb +++ b/activesupport/lib/active_support/testing/performance/ruby/mri.rb @@ -15,7 +15,7 @@ module ActiveSupport end end end - + class Memory < DigitalInformationUnit # Ruby 1.8 + ruby-prof wrapper if RubyProf.respond_to?(:measure_memory) @@ -24,7 +24,7 @@ module ActiveSupport end end end - + class Objects < Amount # Ruby 1.8 + ruby-prof wrapper if RubyProf.respond_to?(:measure_allocations) @@ -33,7 +33,7 @@ module ActiveSupport end end end - + class GcRuns < Amount # Ruby 1.8 + ruby-prof wrapper if RubyProf.respond_to?(:measure_gc_runs) @@ -42,7 +42,7 @@ module ActiveSupport end end end - + class GcTime < Time # Ruby 1.8 + ruby-prof wrapper if RubyProf.respond_to?(:measure_gc_time) @@ -55,5 +55,3 @@ module ActiveSupport end end end - - diff --git a/activesupport/lib/active_support/testing/performance/ruby/yarv.rb b/activesupport/lib/active_support/testing/performance/ruby/yarv.rb index 62095a8fe4..7873262331 100644 --- a/activesupport/lib/active_support/testing/performance/ruby/yarv.rb +++ b/activesupport/lib/active_support/testing/performance/ruby/yarv.rb @@ -15,7 +15,7 @@ module ActiveSupport end end end - + class Memory < DigitalInformationUnit # Ruby 1.9 + GCdata patch if GC.respond_to?(:malloc_allocated_size) @@ -24,7 +24,7 @@ module ActiveSupport end end end - + class Objects < Amount # Ruby 1.9 + GCdata patch if GC.respond_to?(:malloc_allocations) @@ -33,7 +33,7 @@ module ActiveSupport end end end - + class GcRuns < Amount # Ruby 1.9 if GC.respond_to?(:count) @@ -42,7 +42,7 @@ module ActiveSupport end end end - + class GcTime < Time # Ruby 1.9 with GC::Profiler if defined?(GC::Profiler) && GC::Profiler.respond_to?(:total_time) |