Quick Links:

bal | bbl | bdl | bsl

Public Member Functions | Static Public Attributes

balm::MetricRecord Class Reference

#include <balm_metricrecord.h>

List of all members.

Public Member Functions

 BSLMF_ASSERT (bsl::is_trivially_copyable< MetricId >::value)
 BSLMF_NESTED_TRAIT_DECLARATION (MetricRecord, bsl::is_trivially_copyable)
 MetricRecord ()
 MetricRecord (const MetricId &metricId)
 MetricRecord (const MetricId &metricId, int count, double total, double min, double max)
MetricIdmetricId ()
int & count ()
double & total ()
double & max ()
double & min ()
const MetricIdmetricId () const
const int & count () const
const double & total () const
const double & max () const
const double & min () const
bsl::ostream & print (bsl::ostream &stream) const

Static Public Attributes

static const double k_DEFAULT_MIN
static const double k_DEFAULT_MAX
static const double DEFAULT_MIN
static const double DEFAULT_MAX

Detailed Description

Each instance of this class represents the aggregated value of a metric. A metric record contains a MetricId object (identifying the metric), the number of times the measured event has occurred as well as the minimum, maximum, and total of the measured value. The default metricId is the invalid id value, the default count is 0, the defined k_DEFAULT_MIN constant (the representation for positive default total is 0.0, the default min is the infinity), and the default max is the defined k_DEFAULT_MAX constant (the representation for negative infinity).

See Component balm_metricrecord


Constructor & Destructor Documentation

balm::MetricRecord::MetricRecord (  ) 

Create a metric record having default values for its metric metricId, count, total, min, and max attributes. The default metricId is the invalid id value, the default count is 0, the default total is 0.0, the default min is the defined k_DEFAULT_MIN constant (the representation for positive infinity), and the default max is the defined k_DEFAULT_MAX constant (the representation for negative infinity).

balm::MetricRecord::MetricRecord ( const MetricId metricId  ) 

Create a metric record having the specified metricId, and default values for the total, count, min, and max attributes. The default count is 0, the default total is 0.0, the default min is the defined k_DEFAULT_MIN constant (the representation for positive infinity), and the default max is the defined k_DEFAULT_MAX constant (the representation for negative infinity).

balm::MetricRecord::MetricRecord ( const MetricId metricId,
int  count,
double  total,
double  min,
double  max 
)

Create a metric record having the specified metricId, count, total, min, and max attribute values.


Member Function Documentation

balm::MetricRecord::BSLMF_ASSERT ( bsl::is_trivially_copyable< MetricId >::value   ) 
balm::MetricRecord::BSLMF_NESTED_TRAIT_DECLARATION ( MetricRecord  ,
bsl::is_trivially_copyable   
)
MetricId& balm::MetricRecord::metricId (  ) 

Return a reference to the modifiable metricId attribute representing the identifier for the metric being recorded.

int& balm::MetricRecord::count (  ) 

Return a reference to the modifiable count attribute representing the number of individually recorded values.

double& balm::MetricRecord::total (  ) 

Return a reference to the modifiable total attribute representing the sum of the individually recorded values.

double& balm::MetricRecord::max (  ) 

Return a reference to the modifiable max attribute representing the maximum of the individually recorded values.

double& balm::MetricRecord::min (  ) 

Return a reference to the modifiable min attribute representing the minimum of the individually recorded values.

const MetricId& balm::MetricRecord::metricId (  )  const

Return a reference to the non-modifiable metricId attribute representing the identifier for the metric being recorded.

const int& balm::MetricRecord::count (  )  const

Return a reference to the non-modifiable count attribute representing the number of individually recorded values.

const double& balm::MetricRecord::total (  )  const

Return a reference to the non-modifiable total attribute representing the sum of the individually recorded values.

const double& balm::MetricRecord::max (  )  const

Return a reference to the non-modifiable max attribute representing the maximum of the individually recorded values.

const double& balm::MetricRecord::min (  )  const

Return a reference to the non-modifiable min attribute representing the minimum of the individually recorded values.

bsl::ostream& balm::MetricRecord::print ( bsl::ostream &  stream  )  const

Write a description of this record to the specified stream and return a reference to the modifiable stream.


Member Data Documentation

const double balm::MetricRecord::k_DEFAULT_MIN [static]

default minimum value

const double balm::MetricRecord::k_DEFAULT_MAX [static]

default maximum value

const double balm::MetricRecord::DEFAULT_MIN [static]
const double balm::MetricRecord::DEFAULT_MAX [static]

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