mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
warn the user about unsupported benchmarking metrics he might have asked for
This commit is contained in:
@@ -12,7 +12,6 @@ module ActiveSupport
|
||||
if ARGV.include?('--benchmark') # HAX for rake test
|
||||
{ :benchmark => true,
|
||||
:runs => 4,
|
||||
:metrics => [:wall_time, :memory, :objects, :gc_runs, :gc_time],
|
||||
:output => 'tmp/performance' }
|
||||
else
|
||||
{ :benchmark => false,
|
||||
@@ -41,6 +40,8 @@ module ActiveSupport
|
||||
if klass = Metrics[metric_name.to_sym]
|
||||
run_profile(klass.new)
|
||||
result.add_run
|
||||
else
|
||||
puts '%20s: unsupported' % metric_name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user