Devel::NYTProf::Apache

2,881 views
2,752 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,881
On SlideShare
0
From Embeds
0
Number of Embeds
14
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Devel::NYTProf::Apache

  1. 1. Devel::NYTProf  + Apache  tokuhirom 2008-08-19(Tue)
  2. 2.  Devel::NYTProf  <ul><li>Profiler </li></ul><ul><ul><li>Fast! </li></ul></ul><ul><ul><li>Cool! </li></ul></ul><ul><ul><li>Beautiful! </li></ul></ul>
  3. 3. 推測するな 計測せよ
  4. 4. Devel::NYTProf::Aapche <ul><li>Profiling mod_perl  </li></ul>
  5. 5. How it works? <ul><li>PerlChildInitHandler </li></ul><ul><ul><li>sub { DB::enable_profile } </li></ul></ul><ul><li>PerlChildExitHandler </li></ul><ul><ul><li>sub { DB::_finish } </li></ul></ul>
  6. 6. configuration <ul><li>PerlPassEnv NYTPROF </li></ul><ul><li>PerlModule Devel::NYTProf::Apache </li></ul>
  7. 7. Run Apache <ul><li>RUN! </li></ul><ul><ul><li>Defaulting NYTPROF env var to 'file= /tmp/nytprof.9533.out ' </li></ul></ul><ul><li>Note: </li></ul><ul><ul><li>MaxClients =1 </li></ul></ul><ul><ul><li>二 回目のデータを使う </li></ul></ul>
  8. 8. Processing Results  <ul><li>/tmp/nytprof.9533.out. 9522 </li></ul><ul><ul><li>9522 = child pid </li></ul></ul><ul><li>nytprofhtml –f /tmp/nytprof.9533.out.9522 </li></ul><ul><li>open nytprof/index.html  </li></ul>
  9. 9. Result 
  10. 10. That's all <ul><li>any questions? </li></ul>

×