[#BloombergLP-balb-PerformanceMonitor-2constructor-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balb.adoc[balb]::xref:BloombergLP/balb/PerformanceMonitor.adoc[PerformanceMonitor]::PerformanceMonitor
:relfileprefix: ../../../
:mrdocs:

Create a performance monitor that collects statistics on a schedule&period;

== Synopsis

Declared in `&lt;balb&lowbar;performancemonitor&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
PerformanceMonitor(
    xref:BloombergLP/bdlmt/TimerEventScheduler.adoc[bdlmt::TimerEventScheduler]* scheduler,
    double interval,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

== Description

Create an instance of this class that uses the specified `scheduler` to automatically collect performance statistics every specified `interval` (specified in seconds)&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; A non&hyphen;positive `interval` value indicates that performance statistics should _not_ be automatically collected&hyphen;&hyphen;in this case the user is responsible for manually calling the `collect` function&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *scheduler*
| timer scheduler used for automatic collection
| *interval*
| seconds between automatic collections&semi; non&hyphen;positive disables automatic collection
| *basicAllocator*
| memory allocator&semi; null uses the default
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
