aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorGonçalo Silva <goncalossilva@gmail.com>2011-03-25 18:00:29 +0000
committerGonçalo Silva <goncalossilva@gmail.com>2011-03-25 18:00:29 +0000
commitc58e063da0358bc30b3d2fb90c4f08fcd32831fa (patch)
tree86b31c3477c56ce945a068d617bc3cd117cbf8e9 /activesupport/lib
parentcf29d90ef1894d8a3dc7291fd1a2068c5f04f738 (diff)
downloadrails-c58e063da0358bc30b3d2fb90c4f08fcd32831fa.tar.gz
rails-c58e063da0358bc30b3d2fb90c4f08fcd32831fa.tar.bz2
rails-c58e063da0358bc30b3d2fb90c4f08fcd32831fa.zip
added memory size and allocations to rubinius' benchmarks
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/testing/performance/rubinius.rb12
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