aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorGonçalo Silva <goncalossilva@gmail.com>2011-03-25 18:01:39 +0000
committerGonçalo Silva <goncalossilva@gmail.com>2011-03-25 18:01:39 +0000
commit417b2baf0fafc48dbfdab8a81b15836599a0613e (patch)
tree2b65cef8c81d6dbf58ae7541bee7cb2277b0f307 /activesupport/lib/active_support
parentc58e063da0358bc30b3d2fb90c4f08fcd32831fa (diff)
downloadrails-417b2baf0fafc48dbfdab8a81b15836599a0613e.tar.gz
rails-417b2baf0fafc48dbfdab8a81b15836599a0613e.tar.bz2
rails-417b2baf0fafc48dbfdab8a81b15836599a0613e.zip
added gc info (runs, time) to rubinius' benchmarks
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/testing/performance/rubinius.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/testing/performance/rubinius.rb b/activesupport/lib/active_support/testing/performance/rubinius.rb
index 2dd866aa4a..ef4d2bd493 100644
--- a/activesupport/lib/active_support/testing/performance/rubinius.rb
+++ b/activesupport/lib/active_support/testing/performance/rubinius.rb
@@ -58,11 +58,15 @@ module ActiveSupport
end
class GcRuns < Amount
- def measure; 0; end
+ def measure
+ loopback.get("system.gc.full.count").last + loopback.get("system.gc.young.count").last
+ end
end
class GcTime < Time
- def measure; 0; end
+ def measure
+ loopback.get("system.gc.full.wallclock").last + loopback.get("system.gc.young.wallclock").last
+ end
end
end
end