diff options
Diffstat (limited to 'activesupport/lib/active_support/testing/performance/rubinius.rb')
-rw-r--r-- | activesupport/lib/active_support/testing/performance/rubinius.rb | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/testing/performance/rubinius.rb b/activesupport/lib/active_support/testing/performance/rubinius.rb new file mode 100644 index 0000000000..c6725b988a --- /dev/null +++ b/activesupport/lib/active_support/testing/performance/rubinius.rb @@ -0,0 +1,61 @@ +module ActiveSupport + module Testing + module Performance + protected + def run_gc + end + + module Metrics + class Base + def profile + yield + end + + protected + def with_gc_stats + yield + end + end + + class Time < Base; end + + class ProcessTime < Time + def measure; 0; end + end + + class WallTime < Time + def measure; 0; end + end + + class CpuTime < Time + def measure; 0; end + end + + class Memory < Base + def measure; 0; end + end + + class Objects < Amount + def measure; 0; end + end + + class GcRuns < Amount + def measure; 0; end + end + + class GcTime < Time + def measure; 0; end + end + end + end + end +end + +if RUBY_VERSION >= '1.9.2' + require 'active_support/testing/performance/ruby/yarv' +elsif RUBY_VERSION >= '1.8.6' + require 'active_support/testing/performance/ruby/mri' +else + $stderr.puts 'Update your ruby interpreter to be able to run benchmarks.' + exit +end |