diff options
author | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-25 17:59:22 +0000 |
---|---|---|
committer | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-25 17:59:22 +0000 |
commit | cf29d90ef1894d8a3dc7291fd1a2068c5f04f738 (patch) | |
tree | 5fc61e7934540dd27c63996b598257549c92714a | |
parent | 9e9090f887b61f4dca1cf6ea74cb64e649e95719 (diff) | |
download | rails-cf29d90ef1894d8a3dc7291fd1a2068c5f04f738.tar.gz rails-cf29d90ef1894d8a3dc7291fd1a2068c5f04f738.tar.bz2 rails-cf29d90ef1894d8a3dc7291fd1a2068c5f04f738.zip |
added time (wall, process, cpu) to rubinius' benchmarks
-rw-r--r-- | activesupport/lib/active_support/testing/performance/rubinius.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/testing/performance/rubinius.rb b/activesupport/lib/active_support/testing/performance/rubinius.rb index d91337c469..55fdd9fc9c 100644 --- a/activesupport/lib/active_support/testing/performance/rubinius.rb +++ b/activesupport/lib/active_support/testing/performance/rubinius.rb @@ -5,16 +5,20 @@ module ActiveSupport module Performance protected def run_gc + GC.run(true) end - module Metrics - class Base + module Metrics + class Base + # TODO def profile yield end protected + # overridden by each implementation def with_gc_stats + GC.run(true) yield end end @@ -22,14 +26,18 @@ module ActiveSupport class Time < Base; end class ProcessTime < Time + # unsupported def measure; 0; end end class WallTime < Time - def measure; 0; end + def measure + super + end end class CpuTime < Time + # unsupported def measure; 0; end end |