Skip to content

Commit

Permalink
Merge pull request #8407 from kennyj/fix_profiler_comments
Browse files Browse the repository at this point in the history
Fix wrong doc and message about rails profiler.
  • Loading branch information
rafaelfranca committed Dec 3, 2012
2 parents 4fac8c6 + 0f47c49 commit d7fdcc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions guides/source/performance_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,9 @@ Usage: rails profiler 'Ruby.code' 'Ruby.more_code' ... [OPTS]
Default: 1
-o, --output PATH Directory to use when writing the results.
Default: tmp/performance
--metrics a,b,c Metrics to use.
-m, --metrics a,b,c Metrics to use.
Default: process_time,memory,objects
-m, --formats x,y,z Formats to output to.
-f, --formats x,y,z Formats to output to.
Default: flat,graph_html,call_tree
```

Expand Down
2 changes: 1 addition & 1 deletion railties/lib/rails/commands/profiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def options
defaults = ActiveSupport::Testing::Performance::DEFAULTS

OptionParser.new do |opt|
opt.banner = "Usage: rails benchmarker 'Ruby.code' 'Ruby.more_code' ... [OPTS]"
opt.banner = "Usage: rails profiler 'Ruby.code' 'Ruby.more_code' ... [OPTS]"
opt.on('-r', '--runs N', Numeric, 'Number of runs.', "Default: #{defaults[:runs]}") { |r| options[:runs] = r }
opt.on('-o', '--output PATH', String, 'Directory to use when writing the results.', "Default: #{defaults[:output]}") { |o| options[:output] = o }
opt.on('-m', '--metrics a,b,c', Array, 'Metrics to use.', "Default: #{defaults[:metrics].join(",")}") { |m| options[:metrics] = m.map(&:to_sym) }
Expand Down

0 comments on commit d7fdcc8

Please sign in to comment.