From 09bd0eeefc5cb3c2cb26e17b486dd0965afbf4d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Silva?= Date: Mon, 28 Mar 2011 04:03:47 +0100 Subject: fixed a couple of hidden bugs --- activesupport/lib/active_support/testing/performance.rb | 3 ++- activesupport/lib/active_support/testing/performance/ruby.rb | 2 +- activesupport/lib/active_support/testing/performance/ruby/yarv.rb | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb index 3195750841..495fcea381 100644 --- a/activesupport/lib/active_support/testing/performance.rb +++ b/activesupport/lib/active_support/testing/performance.rb @@ -21,6 +21,7 @@ module ActiveSupport def self.included(base) base.superclass_delegating_accessor :profile_options + base.profile_options = {} end def full_profile_options @@ -44,7 +45,7 @@ module ActiveSupport run_profile(klass.new) result.add_run else - puts '%20s: unsupported' % @metric.name + puts '%20s: unsupported' % metric_name end end end diff --git a/activesupport/lib/active_support/testing/performance/ruby.rb b/activesupport/lib/active_support/testing/performance/ruby.rb index a8b26b85eb..36dc75ca8f 100644 --- a/activesupport/lib/active_support/testing/performance/ruby.rb +++ b/activesupport/lib/active_support/testing/performance/ruby.rb @@ -10,7 +10,7 @@ module ActiveSupport module Performance DEFAULTS.merge!( if ARGV.include?('--benchmark') - ({:metrics => [:wall_time, :memory, :objects, :gc_runs, :gc_time]} + {:metrics => [:wall_time, :memory, :objects, :gc_runs, :gc_time]} else { :min_percent => 0.01, :metrics => [:process_time, :memory, :objects], diff --git a/activesupport/lib/active_support/testing/performance/ruby/yarv.rb b/activesupport/lib/active_support/testing/performance/ruby/yarv.rb index ed2b8d6803..38b6e67767 100644 --- a/activesupport/lib/active_support/testing/performance/ruby/yarv.rb +++ b/activesupport/lib/active_support/testing/performance/ruby/yarv.rb @@ -1,5 +1,5 @@ begin - require 'test-unit' + gem 'test-unit' rescue LoadError $stderr.puts 'Specify test-unit as application\'s dependency in Gemfile to run benchmarks.' exit -- cgit v1.2.3