Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Isn't this something that would be well suited for DTrace? I am assuming you are running Solaris 10... Sorry I was in a meeting the first go around Brendan Gregg would do something like this

#!/usr/sbin/dtrace -s /* * mysqld_pid_etime.d - measure mysqld query execution latency. * Written for Solaris 10 (needs DTrace). * * 01-Jun-2007, ver 0.50 * * USAGE: ./mysqld_pid_etime.d -p `pgrep -x mysqld` * * This prints distribution plots of the elapsed time during the execu +tion * of MySQL statements, with a plot for each query string traced. This * measure the execution stage only, not the parse or plan stages. * * This is written using the DTrace pid provider, which means it uses +an * unstable interface and is likely to stop working for future version +s of * mysql (this was tested on mysql-5.1.17-beta). * * 01-Jun-2007 Brendan Gregg Created this. */ #pragma D option quiet dtrace:::BEGIN { printf("Tracing... Hit Ctrl-C to end.\n"); } pid$target::*mysql_parse*:entry { self->query = copyinstr(arg1); } pid$target::*mysql_execute_command*:entry { self->start = timestamp; } pid$target::*mysql_execute_command*:return /self->start/ { this->elapsed = timestamp - self->start; @time[self->query] = quantize(this->elapsed); self->query = 0; self->start = 0; } dtrace:::END { printf("MySQL Query execution latency (ns):\n"); printa(@time); } </

There is a lot more detail to be found HERE

Hope this points you in the right direction. Cheers - Jeffery

In reply to Re^2: Sun Solaris (SPARC processor) + Threads + performance/optimization by JSchmitz
in thread Sun Solaris (SPARC processor) + Threads + performance/optimization by gulden

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (5)
    As of 2018-06-25 06:37 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?



      Results (126 votes). Check out past polls.

      Notices?