Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removed redundant metric support check (and print when it isn't)

  • Loading branch information...
commit 7fcf0ca69e18841be9fb0dcce2721f4ed2c8eca9 1 parent aaa85cd
Gonçalo Silva goncalossilva authored
6 activesupport/lib/active_support/testing/performance.rb
View
@@ -90,6 +90,8 @@ def run(result)
if klass = Metrics[metric_name.to_sym]
run_profile(klass.new)
result.add_run
+ else
+ puts '%20s: unsupported' % metric_name
end
end
end
@@ -256,9 +258,7 @@ def name
@name ||= self.class.name.demodulize.underscore
end
- def benchmark
- @unsureturn if measure.nil?
-
+ def benchmark
with_gc_stats do
before = measure
yield
6 activesupport/lib/active_support/testing/performance/rubinius.rb
View
@@ -84,19 +84,19 @@ def measure
end
end
- class Memory < DigitalInformationUnit
+ class Memory < DigitalInformationUnit
def measure
loopback.get("system.memory.counter.bytes").last
end
end
- class Objects < Amount
+ class Objects < Amount
def measure
loopback.get("system.memory.counter.objects").last
end
end
- class GcRuns < Amount
+ class GcRuns < Amount
def measure
loopback.get("system.gc.full.count").last + loopback.get("system.gc.young.count").last
end
Please sign in to comment.
Something went wrong with that request. Please try again.