Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use a trace class. The drawback: you have to declare an instance of this tracer in the very begining of each function you have to log/mesure. It also adds significant amount of cycles to your mesures, so only huge functions can be properly traced with this method.</p> <p>Another way to achieve that is to write a real profiler but such a tool already exists ( gprof ), and write a parser for it. Still you can write your own... a realy long task.</p> <p>I recommand you testing each function or group separately, in unit tests, this is the way we usualy do it efficiently. Then pops up a profiler and try to optimize the 10% code you are running 90% of the time. You are focusing on the small details by looking them far away.</p> <p>Here is an outpu of one of my tool:</p> <blockquote> <p>Fri Jul 09 00:49:12 2010 - [ 3799946229640 ] - D:\Code Project\include/design/BTL/algorithm/dispatch_policy.h::operator() # |...operator() ( ) {</p> <p>Fri Jul 09 00:49:12 2010 - [ 3799946246830 ] - D:\Code Project\include/design/BTL/algorithm/dispatch_policy.h::operator() # |...shape *, shape *</p> <p>Fri Jul 09 00:49:12 2010 - [ 3799946265738 ] - D:\Code Project\include/design/BTL/algorithm/dispatch_policy.h::operator() # |...} operator() : 46027 cpu_cycles</p> </blockquote> <p>As you stated above the output is huge making it impractical for deep analisys, you cannot neither monitor a program for too long due to the 20Mb/s output stream. It's only usefull when you already know where to investigate. Another concern du to the théorical bandwidth required by such a tool, you HAVE TO use bufferred ostreams ... making the tool all the more intrusive to the real software. I've already experienced a x10 slowdown !</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload