From c58e063da0358bc30b3d2fb90c4f08fcd32831fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Silva?= Date: Fri, 25 Mar 2011 18:00:29 +0000 Subject: added memory size and allocations to rubinius' benchmarks --- .../lib/active_support/testing/performance/rubinius.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support/testing') diff --git a/activesupport/lib/active_support/testing/performance/rubinius.rb b/activesupport/lib/active_support/testing/performance/rubinius.rb index 55fdd9fc9c..2dd866aa4a 100644 --- a/activesupport/lib/active_support/testing/performance/rubinius.rb +++ b/activesupport/lib/active_support/testing/performance/rubinius.rb @@ -14,6 +14,10 @@ module ActiveSupport def profile yield end + + def loopback + @loopback ||= Rubinius::Agent.loopback + end protected # overridden by each implementation @@ -42,11 +46,15 @@ module ActiveSupport 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 -- cgit v1.2.3