Mutex that tracks cumulative hold time and wait time.
Synopsis
Declared in <bslmt_meteredmutex.h>
class MeteredMutex;
Description
This class implements a mutex, that has the additional capability to keep track of hold time and wait time. The hold time is defined as the cumulative duration for which the mutex was in the locked state. The wait time is defined as the duration for which threads waited for the mutex.
Member Functions
Name |
Description |
|
Create a metered mutex in the unlocked state. |
|
Destroy this metered mutex. |
Return the hold time (in nanoseconds) accumulated since the most recent call to |
|
Return the time of the most recent metrics reset. |
|
Acquire the lock on this metered mutex. |
|
Reset the wait and hold time to zero and record the current time. |
|
Attempt to acquire the lock on this metered mutex. |
|
Release the lock on this mutex that was previously acquired through a successful call to |
|
Return accumulated wait time since the last metrics reset. |
Created with MrDocs