Browse files

added memory size and allocations to rubinius' benchmarks

  • Loading branch information...
1 parent cf29d90 commit c58e063da0358bc30b3d2fb90c4f08fcd32831fa @goncalossilva goncalossilva committed Mar 25, 2011
Showing with 10 additions and 2 deletions.
  1. +10 −2 activesupport/lib/active_support/testing/performance/rubinius.rb
View
12 activesupport/lib/active_support/testing/performance/rubinius.rb
@@ -14,6 +14,10 @@ class Base
def profile
yield
end
+
+ def loopback
+ @loopback ||= Rubinius::Agent.loopback
+ end
protected
# overridden by each implementation
@@ -42,11 +46,15 @@ def measure; 0; end
end
class Memory < Base
- def measure; 0; end
+ def measure
+ loopback.get("system.memory.counter.bytes").last
+ end
end
class Objects < Amount
- def measure; 0; end
+ def measure
+ loopback.get("system.memory.counter.bytes").last
+ end
end
class GcRuns < Amount

0 comments on commit c58e063

Please sign in to comment.