From 1db54d7d01ea36a9d8c0c6276d66d04a9a6c2fac Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Mon, 4 Feb 2013 17:16:25 +0100 Subject: Backport rails/rails-perftest#2 to fix rake test:benchmark --- activesupport/lib/active_support/testing/performance/jruby.rb | 2 +- activesupport/lib/active_support/testing/performance/rubinius.rb | 2 +- activesupport/lib/active_support/testing/performance/ruby.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'activesupport/lib/active_support/testing/performance') diff --git a/activesupport/lib/active_support/testing/performance/jruby.rb b/activesupport/lib/active_support/testing/performance/jruby.rb index b347539f13..af08f0e22d 100644 --- a/activesupport/lib/active_support/testing/performance/jruby.rb +++ b/activesupport/lib/active_support/testing/performance/jruby.rb @@ -6,7 +6,7 @@ module ActiveSupport module Testing module Performance DEFAULTS.merge!( - if ARGV.include?('--benchmark') + if ENV["BENCHMARK_TESTS"] {:metrics => [:wall_time, :user_time, :memory, :gc_runs, :gc_time]} else { :metrics => [:wall_time], diff --git a/activesupport/lib/active_support/testing/performance/rubinius.rb b/activesupport/lib/active_support/testing/performance/rubinius.rb index d9ebfbe352..baabd9cc44 100644 --- a/activesupport/lib/active_support/testing/performance/rubinius.rb +++ b/activesupport/lib/active_support/testing/performance/rubinius.rb @@ -4,7 +4,7 @@ module ActiveSupport module Testing module Performance DEFAULTS.merge!( - if ARGV.include?('--benchmark') + if ENV["BENCHMARK_TESTS"] {:metrics => [:wall_time, :memory, :objects, :gc_runs, :gc_time]} else { :metrics => [:wall_time], diff --git a/activesupport/lib/active_support/testing/performance/ruby.rb b/activesupport/lib/active_support/testing/performance/ruby.rb index 50c4852d4c..5aaed2bbe7 100644 --- a/activesupport/lib/active_support/testing/performance/ruby.rb +++ b/activesupport/lib/active_support/testing/performance/ruby.rb @@ -9,7 +9,7 @@ module ActiveSupport module Testing module Performance DEFAULTS.merge!( - if ARGV.include?('--benchmark') + if ENV["BENCHMARK_TESTS"] { :metrics => [:wall_time, :memory, :objects, :gc_runs, :gc_time] } else { :min_percent => 0.01, -- cgit v1.2.3