22
edits
No edit summary |
No edit summary |
||
| Line 15: | Line 15: | ||
<dd>The constructor takes no arguments | <dd>The constructor takes no arguments | ||
<dt>startProfiling( | <dt>startProfiling() | ||
<dd> | <dd>Ensures that profiling has started. If some other Profiler has started profiling, this is a no-op. If startProfiling() is invoked, an eventual stopProfiling() must be paired to cease profiling data collection. | ||
<dt>isProfiling( | <dt>isProfiling() | ||
<dd>Returns whether | <dd>Returns whether profiling is turned on by any Profiler objects | ||
<dt>frame() | <dt>frame() | ||
<dd>Fetch the current object instance representing the current stack trace of invocation for the invoking context's global. Properties can be added to this object and will be persisted across invocations of this method so long as each invocation has the same backtrace. If the invoking context's global is not being profiled by the <tt>Profiler</tt> instance, then an error is thrown | <dd>Fetch the current object instance representing the current stack trace of invocation for the invoking context's global. Properties can be added to this object and will be persisted across invocations of this method so long as each invocation has the same backtrace. If the invoking context's global is not being profiled by the <tt>Profiler</tt> instance, then an error is thrown | ||
<dt>info( | <dt>info() | ||
<dd>Returns all information | <dd>Returns all profile information for the past XXX seconds. Data is stored in a circular fashion, so only the most recent data will be available. | ||
<dt>clearInfo( | <dt>clearInfo() | ||
<dd>Removes all | <dd>Removes all information stored in profiling. | ||
<dt>stopProfiling( | <dt>stopProfiling() | ||
<dd>Ceases profiling | <dd>Ceases profiling. This must only be called if a pairing call to startProfiling() has been made. | ||
</dl> | </dl> | ||
| Line 119: | Line 119: | ||
* Biased, operational callbacks are only invoked at particular points in the code, so true line-by-line sampling is impossible. It is possible with signal-based sampling, but that has a large number of other issues with it. | * Biased, operational callbacks are only invoked at particular points in the code, so true line-by-line sampling is impossible. It is possible with signal-based sampling, but that has a large number of other issues with it. | ||
* Might still require some wonky code maybe? Not quite sure about this... | * Might still require some wonky code maybe? Not quite sure about this... | ||
=== Choice === | === Choice === | ||
edits