aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-06-27 12:55:36 -0700
committerYves Senn <yves.senn@gmail.com>2013-06-27 12:55:36 -0700
commit0a55bd7c6bdc4c3022cec858e341f7561ec8554b (patch)
tree90dc22392fdcd324a9d50961577573abdb5bd53b /activesupport/lib/active_support
parent63d4894a58825e9d1fb520ec6ac663e4d8529596 (diff)
parentb47f8d035ec6a38a69eb5b3bdb1e27bb40e574c7 (diff)
downloadrails-0a55bd7c6bdc4c3022cec858e341f7561ec8554b.tar.gz
rails-0a55bd7c6bdc4c3022cec858e341f7561ec8554b.tar.bz2
rails-0a55bd7c6bdc4c3022cec858e341f7561ec8554b.zip
Merge pull request #9173 from senny/backport_perftest_fix
Backport rails/rails-perftest#2 to fix rake test:benchmark
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/testing/performance.rb2
-rw-r--r--activesupport/lib/active_support/testing/performance/jruby.rb2
-rw-r--r--activesupport/lib/active_support/testing/performance/rubinius.rb2
-rw-r--r--activesupport/lib/active_support/testing/performance/ruby.rb2
4 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb
index dd23f8d82d..5b74e52953 100644
--- a/activesupport/lib/active_support/testing/performance.rb
+++ b/activesupport/lib/active_support/testing/performance.rb
@@ -23,7 +23,7 @@ module ActiveSupport
# each implementation should define metrics and freeze the defaults
DEFAULTS =
- if ARGV.include?('--benchmark') # HAX for rake test
+ if ENV["BENCHMARK_TESTS"]
{ :runs => 4,
:output => 'tmp/performance',
:benchmark => true }
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,