Of couse you can log some timing for, say db calls, but it's too intrusive (requires littling the code with such logging.)

If your concern is "littering the code with such logging", the maybe you should check out Log::Log4Perl. Yes, you put many logging statements in the code, but their purpose is clear (you can say things like $log->debug('starting DB call');). Besides that, you can leave them off through a configuration directive, and only turn on the low-level logging when someone is reporting a problem.

Without the ability to easily log verbosely, tracing down complex profiling problems is nigh-impossible.

As an asside, I've had reasonable success with doing proactive performance monitoring. For example, I have put code into production that triggers a warning to a specific logfile if a DB query takes longer than a configurable number of seconds. A cron job than checks that logfile, and if several such warnings have occurred in a given time span (e.g. 20 warnings in 5 minutes), an e-mail is sent. Then I can work on fixing the issue before people start complaining. ;-)

<-radiant.matrix->
A collection of thoughts and links from the minds of geeks
The Code that can be seen is not the true Code
"In any sufficiently large group of people, most are idiots" - Kaa's Law

In reply to Re: Web application performance monitoring tools by radiantmatrix
in thread Web application performance monitoring tools by johnnywang

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.