Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Logging tells you <em>what</em> happened. It's great for forensics and debugging.</p> <p>Profiling quantifies that: it tells you how much time your code spent in each area, or how many times a body of code was executed. It helps you improve your code's performance.</p> <p>Profiling typically operates at the level of a line of code, a function call, or sometimes a file. For each level, it can typically tell you:</p> <ul> <li><p><em>How many times</em> the unit was executed. It's generally less important to optimize rarely-used code than code that executes millions of times. One exception is code that makes a user (or another process) wait for it to complete.</p></li> <li><p>How many times a <em>branch</em> was taken, say in an <code>if</code> or <code>switch</code> statement. Again, you typically care most about optimizing often-used code.</p></li> <li><p><em>How much time</em> was spent <em>in a particular function</em>. <strong>Warning:</strong> even experienced developers are often surprised by these results. It's very difficult to predict where your "time sinks" are.</p></li> <li><p><em>How much time</em> was spent in a function <em>and all functions called within that function</em>. Maybe it's not the function itself, but its children, that need optimizing.</p></li> <li><p><em>How many times</em> the unit was called <em>by each caller</em>. You may find that a particular function is called primarily from an unexpected place.</p></li> </ul> <p>Armed with the data from a good profiler, you can often gain significant improvements in performance with relatively little effort.</p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. 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