Create a performance monitor that collects statistics on a schedule.
Declared in <balb_performancemonitor.h>
PerformanceMonitor(
bdlmt::TimerEventScheduler* scheduler,
double interval,
bslma::Allocator* basicAllocator = 0);
Create an instance of this class that uses the specified scheduler to automatically collect performance statistics every specified interval (specified in seconds). Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. A non-positive interval value indicates that performance statistics should not be automatically collected--in this case the user is responsible for manually calling the collect function.
| Name | Description |
|---|---|
| scheduler | timer scheduler used for automatic collection |
| interval | seconds between automatic collections; non-positive disables automatic collection |
| basicAllocator | memory allocator; null uses the default |