aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing/performance.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/testing/performance.rb')
-rw-r--r--activesupport/lib/active_support/testing/performance.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb
index 244ee1a224..2bea0f991a 100644
--- a/activesupport/lib/active_support/testing/performance.rb
+++ b/activesupport/lib/active_support/testing/performance.rb
@@ -61,7 +61,7 @@ module ActiveSupport
ensure
begin
teardown
- run_callbacks :teardown, :enumerator => :reverse_each
+ run_callbacks :teardown
rescue Exception => e
result = @runner.puke(self.class, method_name, e)
end
@@ -126,7 +126,7 @@ module ActiveSupport
def record; end
end
- class Benchmarker < Performer
+ class Benchmarker < Performer
def initialize(*args)
super
@supported = @metric.respond_to?('measure')
@@ -196,6 +196,7 @@ module ActiveSupport
class Base
include ActionView::Helpers::NumberHelper
+ include ActionView::Helpers::OutputSafetyHelper
attr_reader :total
@@ -207,7 +208,7 @@ module ActiveSupport
@name ||= self.class.name.demodulize.underscore
end
- def benchmark
+ def benchmark
with_gc_stats do
before = measure
yield