aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/performance_testing.textile
diff options
context:
space:
mode:
authorRomD <romd86@gmail.com>2010-02-06 17:18:10 +0100
committerCarl Lerche <carllerche@mac.com>2010-02-06 09:51:53 -0800
commitf44a0b1d524064a2e919cd10d3013db680af9b17 (patch)
tree43011f4c151d45dbecdf0eeb78806e9ac3e8f391 /railties/guides/source/performance_testing.textile
parent6958eac1a00a4ab33e3facc70c80a07492288196 (diff)
downloadrails-f44a0b1d524064a2e919cd10d3013db680af9b17.tar.gz
rails-f44a0b1d524064a2e919cd10d3013db680af9b17.tar.bz2
rails-f44a0b1d524064a2e919cd10d3013db680af9b17.zip
fix usage examples and more to use new invocations
Signed-off-by: Carl Lerche <carllerche@mac.com>
Diffstat (limited to 'railties/guides/source/performance_testing.textile')
-rw-r--r--railties/guides/source/performance_testing.textile16
1 files changed, 8 insertions, 8 deletions
diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile
index f0dc9acbb8..5c760a5966 100644
--- a/railties/guides/source/performance_testing.textile
+++ b/railties/guides/source/performance_testing.textile
@@ -37,7 +37,7 @@ h4. Generating Performance Tests
Rails provides a generator called +performance_test+ for creating new performance tests:
<shell>
-script/generate performance_test homepage
+rails generate performance_test homepage
</shell>
This generates +homepage_test.rb+ in the +test/performance+ directory:
@@ -381,19 +381,19 @@ h4. +benchmarker+
Usage:
<shell>
-$ script/performance/benchmarker [times] 'Person.expensive_way' 'Person.another_expensive_way' ...
+$ rails benchmarker [times] 'Person.expensive_way' 'Person.another_expensive_way' ...
</shell>
Examples:
<shell>
-$ script/performance/benchmarker 10 'Item.all' 'CouchItem.all'
+$ rails benchmarker 10 'Item.all' 'CouchItem.all'
</shell>
If the +[times]+ argument is omitted, supplied methods are run just once:
<shell>
-$ script/performance/benchmarker 'Item.first' 'Item.last'
+$ rails benchmarker 'Item.first' 'Item.last'
</shell>
h4. +profiler+
@@ -403,19 +403,19 @@ h4. +profiler+
Usage:
<shell>
-$ script/performance/profiler 'Person.expensive_method(10)' [times] [flat|graph|graph_html]
+$ rails profiler 'Person.expensive_method(10)' [times] [flat|graph|graph_html]
</shell>
Examples:
<shell>
-$ script/performance/profiler 'Item.all'
+$ rails profiler 'Item.all'
</shell>
This will profile +Item.all+ in +RubyProf::WALL_TIME+ measure mode. By default, it prints flat output to the shell.
<shell>
-$ script/performance/profiler 'Item.all' 10 graph
+$ rails profiler 'Item.all' 10 graph
</shell>
This will profile +10.times { Item.all }+ with +RubyProf::WALL_TIME+ measure mode and print graph output to the shell.
@@ -423,7 +423,7 @@ This will profile +10.times { Item.all }+ with +RubyProf::WALL_TIME+ measure mod
If you want to store the output in a file:
<shell>
-$ script/performance/profiler 'Item.all' 10 graph 2> graph.txt
+$ rails profiler 'Item.all' 10 graph 2> graph.txt
</shell>
h3. Helper Methods