Methods
Instance Public methods
# File activesupport/lib/active_support/testing/performance.rb, line 45 45: def run(runner) 46: @runner = runner 47: 48: run_warmup 49: if full_profile_options && metrics = full_profile_options[:metrics] 50: metrics.each do |metric_name| 51: if klass = Metrics[metric_name.to_sym] 52: run_profile(klass.new) 53: end 54: end 55: end 56: 57: return 58: end
# File activesupport/lib/active_support/testing/performance.rb, line 60 60: def run_test(metric, mode) 61: result = '.' 62: begin 63: run_callbacks :setup 64: setup 65: metric.send(mode) { __send__ method_name } 66: rescue Exception => e 67: result = @runner.puke(self.class, method_name, e) 68: ensure 69: begin 70: teardown 71: run_callbacks :teardown, :enumerator => :reverse_each 72: rescue Exception => e 73: result = @runner.puke(self.class, method_name, e) 74: end 75: end 76: result 77: end