22
edits
No edit summary |
No edit summary |
||
| Line 14: | Line 14: | ||
<dt>start([sample_rate, [max_samples]]) | <dt>start([sample_rate, [max_samples]]) | ||
<dd>Begins profiling. All arguments are optional. | <dd>Begins profiling. All arguments are optional. The sample rate is the time between samples of the call stack specified in microseconds (defaults to 1000 = 1ms). The sample rate is mostly a guideline as the platform being run might not guarantee the granularity of timing. Samples will not happen more frequently than the specified rate, but may occur more infrequently. | ||
The sample rate is the time between samples of the call stack specified in microseconds (defaults to 1000 = 1ms). The sample rate is mostly a guideline as the platform being run might not guarantee the granularity of timing. Samples will not happen more frequently than the specified rate, but may occur more infrequently. | |||
A maximum number of samples can be specified as well, but the default is unlimited (0). If the maximum number of samples is reached, then the sample storage is treated as a ring buffer, discarding the oldest samples. | A maximum number of samples can be specified as well, but the default is unlimited (0). If the maximum number of samples is reached, then the sample storage is treated as a ring buffer, discarding the oldest samples. | ||
If some other Profiler object is profiling the | If some other Profiler object is profiling the runtime, then an error is thrown. Eventually a call to stop() must be paired with this call to cease data collection. | ||
<dt>isProfiling() | <dt>isProfiling() | ||
<dd>Returns whether profiling is turned on for the runtime | <dd>Returns whether profiling is turned on for the runtime | ||
edits