Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added memory size and allocations to rubinius' benchmarks

  • Loading branch information...
commit c58e063da0358bc30b3d2fb90c4f08fcd32831fa 1 parent cf29d90
@goncalossilva authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.