From cf29d90ef1894d8a3dc7291fd1a2068c5f04f738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Silva?= Date: Fri, 25 Mar 2011 17:59:22 +0000 Subject: added time (wall, process, cpu) to rubinius' benchmarks --- .../lib/active_support/testing/performance/rubinius.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'activesupport/lib') 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 -- cgit v1.2.3