新しいscriptとして、script/per
というものが
新たに加わったみたいです。
1 h% ./script/performance /request --help 2 USAGE: ./script/p erformance /request [options] [session script path] 3 -n, --times [0000] How many requests to process. Defaults to 100. 4 -b, --benchmar k Benchmark instead of profiling 5 --open [CMD] Command to open profile results. Defaults to "open %s &" 6 -h, --help Show this help
ふむふむ。ベンチマーク系のスクリプトのようですね。 紹介してる記事を見つけました。
New in Rails: a request profiler for profiling your app
Jeremy Kemper (aka bitsweat) committed a very useful tool into the Rails trunk not too long ago: a request profiler! It’s a human-frie
ndly wrapper script around the ruby-prof library, a nice ruby code profiler, that lets you run multiple requests against a URI in your applicatio n and get a detailed code profile report in text and HTML.
おーなるほど。前回のRails勉強会で紹介した ruby-prof を
human-frie
試してみようと思って触ってみたら、上のサイトで紹介されてる ものと、Rails 2.0で入ったものは若干インターフェイスが違う模様。
DHHが書いてる こっちの情報 が最新のようです(以下に抜粋)
Action Pack: New request profilerFiguring out where your bottleneck
$ cat login_sess ion.rb
get_with_r edirect '/'
say "GET / => #{path}"
post_with_ redirect '/sessions', :username => 'john', :password => 'doe'
say "POST /sessions => #{path}"
$ ./script/p erformance /request -n 10 login_sess ion.rb
And you get a thorough breakdown in HTML and text on where time was spent and you’ll have a good idea on where to look for speeding up the applicatio
なにやらIntegratio