From 0f47c496781fda4ce35f79bea9fb03e6b29c1867 Mon Sep 17 00:00:00 2001 From: kennyj Date: Tue, 4 Dec 2012 02:21:31 +0900 Subject: Fix wrong doc and message about rails profiler. --- guides/source/performance_testing.md | 4 ++-- railties/lib/rails/commands/profiler.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/guides/source/performance_testing.md b/guides/source/performance_testing.md index b84c5d1732..a07f64ec29 100644 --- a/guides/source/performance_testing.md +++ b/guides/source/performance_testing.md @@ -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 ``` diff --git a/railties/lib/rails/commands/profiler.rb b/railties/lib/rails/commands/profiler.rb index 3f6966b4f0..315bcccf61 100644 --- a/railties/lib/rails/commands/profiler.rb +++ b/railties/lib/rails/commands/profiler.rb @@ -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) } -- cgit v1.2.3