Permalink
Browse files

added time (wall, process, cpu) to rubinius' benchmarks

  • Loading branch information...
1 parent 9e9090f commit cf29d90ef1894d8a3dc7291fd1a2068c5f04f738 @goncalossilva goncalossilva committed Mar 25, 2011
Showing with 11 additions and 3 deletions.
  1. +11 −3 activesupport/lib/active_support/testing/performance/rubinius.rb
@@ -5,31 +5,39 @@ module Testing
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
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

0 comments on commit cf29d90

Please sign in to comment.