Quick Links:

bal | bbl | bdl | bsl

Public Member Functions | Friends

balb::PerformanceMonitor::Statistics Class Reference

#include <balb_performancemonitor.h>

List of all members.

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (Statistics, bslma::UsesBslmaAllocator)
 Statistics (bslma::Allocator *basicAllocator=0)
 Statistics (const Statistics &original, bslma::Allocator *basicAllocator=0)
void reset ()
double latestValue (Measure measure) const
double minValue (Measure measure) const
double maxValue (Measure measure) const
double avgValue (Measure measure) const
int pid () const
const bsl::stringdescription () const
double elapsedTime () const
const bdlt::DatetimestartupTime () const
void print (bsl::ostream &os) const
void print (bsl::ostream &os, Measure measure) const
void print (bsl::ostream &os, const char *measureIdentifier) const

Friends

class Collector< OsType >

Detailed Description

Defines the performance statistics collected for a monitored process. Note that this class is not fully value-semantic. It is intended to provide a read-only view of a set of collected performance statistics.

See Component balb_performancemonitor


Constructor & Destructor Documentation

balb::PerformanceMonitor::Statistics::Statistics ( bslma::Allocator basicAllocator = 0  )  [explicit]

Create an instance of this class. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

balb::PerformanceMonitor::Statistics::Statistics ( const Statistics original,
bslma::Allocator basicAllocator = 0 
)

Create a Statistics object aggregating the same statistics values as the specified original object. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.


Member Function Documentation

balb::PerformanceMonitor::Statistics::BSLMF_NESTED_TRAIT_DECLARATION ( Statistics  ,
bslma::UsesBslmaAllocator   
)
void balb::PerformanceMonitor::Statistics::reset (  ) 

Reset the min, max, and average values collected for each measure.

double balb::PerformanceMonitor::Statistics::latestValue ( Measure  measure  )  const

Return the latest collected value for the specified measure.

double balb::PerformanceMonitor::Statistics::minValue ( Measure  measure  )  const

Return the minimum collected value for the specified measure.

double balb::PerformanceMonitor::Statistics::maxValue ( Measure  measure  )  const

Return the maximum collected value for the specified measure.

double balb::PerformanceMonitor::Statistics::avgValue ( Measure  measure  )  const

Return the average of the collected values for the specified metric.

int balb::PerformanceMonitor::Statistics::pid (  )  const

Return the pid for which these statistics were collected.

const bsl::string& balb::PerformanceMonitor::Statistics::description (  )  const

Return the user-supplied description of the process identified by the result of the pid() function.

double balb::PerformanceMonitor::Statistics::elapsedTime (  )  const

Return the number of seconds (in wall time) that have elapsed since the startup the process identified by the result of the pid() function.

const bdlt::Datetime& balb::PerformanceMonitor::Statistics::startupTime (  )  const

Return the startup time in Coordinated Universal Time.

void balb::PerformanceMonitor::Statistics::print ( bsl::ostream &  os  )  const

Print all collected statistics to the specified os stream.

void balb::PerformanceMonitor::Statistics::print ( bsl::ostream &  os,
Measure  measure 
) const

Print the specified measure to the specified os stream.

void balb::PerformanceMonitor::Statistics::print ( bsl::ostream &  os,
const char *  measureIdentifier 
) const

Print the specified measureIdentifier to the specified os stream. The value of measureIdentifier should be a string literal corresponding to the desired measure enumerator, e.g., e_CPU_TIME.


Friends And Related Function Documentation

friend class Collector< OsType > [friend]

The documentation for this class was generated from the following file: