<?xml version="1.0" encoding="UTF-8"?>
<article>
  <body>&#26032;&#12375;&#12356;script&#12392;&#12375;&#12390;&#12289;`script/performance/request`&#12392;&#12356;&#12358;&#12418;&#12398;&#12364;
&#26032;&#12383;&#12395;&#21152;&#12431;&#12387;&#12383;&#12415;&#12383;&#12356;&#12391;&#12377;&#12290;

pre&gt;&gt;
h% ./script/performance/request --help
USAGE: ./script/performance/request [options] [session script path]
    -n, --times [0000]               How many requests to process. Defaults to 100.
    -b, --benchmark                  Benchmark instead of profiling
        --open [CMD]                 Command to open profile results. Defaults to &quot;open %s &amp;&quot;
    -h, --help                       Show this help
&lt;&lt;--

&#12405;&#12416;&#12405;&#12416;&#12290;&#12505;&#12531;&#12481;&#12510;&#12540;&#12463;&#31995;&#12398;&#12473;&#12463;&#12522;&#12503;&#12488;&#12398;&#12424;&#12358;&#12391;&#12377;&#12397;&#12290;
&#32057;&#20171;&#12375;&#12390;&#12427;&#35352;&#20107;&#12434;&#35211;&#12388;&#12369;&#12414;&#12375;&#12383;&#12290;

[**New in Rails: a request profiler for profiling your app**](http://blog.codefront.net/2007/10/26/new-in-rails-a-request-profiler-for-profiling-your-app/)

&gt;Jeremy Kemper (aka bitsweat) committed a very useful tool into the Rails trunk not too long ago: a request profiler! It&#8217;s a human-friendly wrapper script around the ruby-prof library, a nice ruby code profiler, that lets you run multiple requests against a URI in your application and get a detailed code profile report in text and HTML.

&#12362;&#12540;&#12394;&#12427;&#12411;&#12393;&#12290;&#21069;&#22238;&#12398;Rails&#21193;&#24375;&#20250;&#12391;&#32057;&#20171;&#12375;&#12383; ruby-prof &#12434;
human-friendly&#12395;&#12375;&#12390;&#12367;&#12428;&#12427;&#12484;&#12540;&#12523;&#12391;&#12377;&#12363;&#12290;&#12371;&#12428;&#12399;&#38754;&#30333;&#12381;&#12358;&#12391;&#12377;&#12397;&#12290;

&#35430;&#12375;&#12390;&#12415;&#12424;&#12358;&#12392;&#24605;&#12387;&#12390;&#35302;&#12387;&#12390;&#12415;&#12383;&#12425;&#12289;&#19978;&#12398;&#12469;&#12452;&#12488;&#12391;&#32057;&#20171;&#12373;&#12428;&#12390;&#12427;
&#12418;&#12398;&#12392;&#12289;Rails 2.0&#12391;&#20837;&#12387;&#12383;&#12418;&#12398;&#12399;&#33509;&#24178;&#12452;&#12531;&#12479;&#12540;&#12501;&#12455;&#12452;&#12473;&#12364;&#36949;&#12358;&#27169;&#27096;&#12290;

DHH&#12364;&#26360;&#12356;&#12390;&#12427;
[&#12371;&#12387;&#12385;&#12398;&#24773;&#22577;](http://weblog.rubyonrails.com/2007/12/7/rails-2-0-it-s-done)
&#12364;&#26368;&#26032;&#12398;&#12424;&#12358;&#12391;&#12377;&#65288;&#20197;&#19979;&#12395;&#25244;&#31883;&#65289;

&lt;html&gt;&lt;blockquote&gt;&lt;/html&gt;
**Action Pack: New request profiler**

Figuring out where your bottlenecks are with real usage can be tough, but we just made it a whole lot easier with the new request profiler that can follow an entire usage script and report on the aggregate findings. You use it like this:

    $ cat login_session.rb
    get_with_redirect '/'
    say &quot;GET / =&gt; #{path}&quot; 
    post_with_redirect '/sessions', :username =&gt; 'john', :password =&gt; 'doe'
    say &quot;POST /sessions =&gt; #{path}&quot; 
    $ ./script/performance/request -n 10 login_session.rb

And you get a thorough breakdown in HTML and text on where time was spent and you&#8217;ll have a good idea on where to look for speeding up the application.
&lt;html&gt;&lt;/blockquote&gt;&lt;/html&gt;

&#12394;&#12395;&#12420;&#12425;IntegrationTest&#12398;&#12467;&#12540;&#12489;&#12398;&#12424;&#12358;&#12394;&#12418;&#12398;&#12434;&#35352;&#36848;&#12375;&#12383;&#12473;&#12463;&#12522;&#12503;&#12488;
&#12434;&#29992;&#24847;&#12375;&#12390;&#12289;&#12381;&#12398;path&#12434;&#28193;&#12379;&#12400;&#33391;&#12356;&#12415;&#12383;&#12356;&#12391;&#12377;&#12290;</body>
  <cached-tag-list>rails &#36939;&#29992; &#38283;&#30330;</cached-tag-list>
  <comments-count type="integer">0</comments-count>
  <created-at type="datetime">2007-12-08T09:39:41+00:00</created-at>
  <daily-archive-id type="integer">264</daily-archive-id>
  <filter-type>blue_stole</filter-type>
  <id type="integer">249</id>
  <monthly-archive-id type="integer">30</monthly-archive-id>
  <pdf-digest nil="true"></pdf-digest>
  <permalink nil="true"></permalink>
  <published-at type="datetime">2007-12-08T21:53:58+00:00</published-at>
  <secret>5a04f64e-17c1-4433-8e20-de8358cada85</secret>
  <title>Action Pack: New request profiler</title>
  <updated-at type="datetime">2008-10-22T20:08:44+00:00</updated-at>
  <user-id type="integer">1</user-id>
</article>
