BDE 4.14.0 Production release
|
#include <balm_defaultmetricsmanager.h>
Public Member Functions | |
DefaultMetricsManagerScopedGuard (bsl::ostream &stream, bslma::Allocator *basicAllocator=0) | |
DefaultMetricsManagerScopedGuard (bslma::Allocator *basicAllocator=0) | |
~DefaultMetricsManagerScopedGuard () | |
MetricsManager * | instance () const |
This class implements a scoped guard that, on construction, creates the default instance of the metrics manager, and, on destruction, destroys that instance. Note that the behavior is undefined if the default instance of the metrics manager is created before creating this guard, or if the default instance is externally destroyed before destroying this guard.
|
inline |
Create a scoped guard which invokes DefaultMetricsManager::create()
to create a default metrics manager instance that is configured with a stream publisher that will publish collected metrics to the specified stream
. Optionally specify a basicAllocator
used to supply memory. If basicAllocator
is 0, the currently installed global allocator is used. The behavior is undefined unless DefaultMetricsManager::instance()
is 0 prior to creating the guard.
|
inline |
Create a scoped guard which invokes the DefaultMetricsManager::create
method. Optionally specify a basicAllocator
used to obtain memory. If basicAllocator
is 0, the currently installed global allocator is used. The behavior is undefined unless 0 == DefaultMetricsManager::instance()
prior to creating the guard. Note that the default metrics manager instance is not configured with a publisher; clients must create a Publisher
object and add it to the default metrics manager in order to publish metrics.
|
inline |
Destroy this scoped guard which invokes DefaultMetricsManager::destroy()
. The behavior is undefined if the default instance of the metrics manager is externally destroyed prior to this destructor being invoked.
|
inline |
Return the address of the MetricsManager
object managed by this scoped guard. The behavior is undefined if the default instance of the metrics manager is externally destroyed, or if the returned address is retained after this scoped guard is destroyed.