Module: ActiveSupport::Testing::Performance

Extended by:
Concern
Defined in:
lib/active_support/testing/performance.rb,
lib/active_support/testing/performance/ruby.rb,
lib/active_support/testing/performance/jruby.rb,
lib/active_support/testing/performance/rubinius.rb,
lib/active_support/testing/performance/ruby/mri.rb,
lib/active_support/testing/performance/ruby/yarv.rb

Defined Under Namespace

Modules: ForClassicTestUnit, ForMiniTest, Metrics Classes: Benchmarker, Performer, Profiler

Constant Summary collapse

DEFAULTS =

each implementation should define metrics and freeze the defaults

if ARGV.include?('--benchmark') # HAX for rake test
  { :runs => 4,
    :output => 'tmp/performance',
    :benchmark => true }
else
  { :runs => 1,
    :output => 'tmp/performance',
    :benchmark => false }
end

Instance Method Summary collapse

Methods included from Concern

append_features, extended, included

Instance Method Details

#full_profile_optionsObject



36
37
38
# File 'lib/active_support/testing/performance.rb', line 36

def full_profile_options
  DEFAULTS.merge(profile_options)
end

#full_test_nameObject



40
41
42
# File 'lib/active_support/testing/performance.rb', line 40

def full_test_name
  "#{self.class.name}##{method_name}"
end