diff options
author | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-25 18:00:29 +0000 |
---|---|---|
committer | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-25 18:00:29 +0000 |
commit | c58e063da0358bc30b3d2fb90c4f08fcd32831fa (patch) | |
tree | 86b31c3477c56ce945a068d617bc3cd117cbf8e9 /activesupport/lib/active_support/testing | |
parent | cf29d90ef1894d8a3dc7291fd1a2068c5f04f738 (diff) | |
download | rails-c58e063da0358bc30b3d2fb90c4f08fcd32831fa.tar.gz rails-c58e063da0358bc30b3d2fb90c4f08fcd32831fa.tar.bz2 rails-c58e063da0358bc30b3d2fb90c4f08fcd32831fa.zip |
added memory size and allocations to rubinius' benchmarks
Diffstat (limited to 'activesupport/lib/active_support/testing')
-rw-r--r-- | activesupport/lib/active_support/testing/performance/rubinius.rb | 12 |
1 files changed, 10 insertions, 2 deletions
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 |