BDE 4.14.0 Production release
Loading...
Searching...
No Matches
balm::MetricRecord Class Reference

#include <balm_metricrecord.h>

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)
 
 MetricRecord (const MetricRecord &original)=default
 
 ~MetricRecord ()=default
 Destroy this object.
 
MetricRecordoperator= (const MetricRecord &rhs)=default
 
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 balm_metricrecord

Constructor & Destructor Documentation

◆ MetricRecord() [1/4]

balm::MetricRecord::MetricRecord ( )
inline

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).

◆ MetricRecord() [2/4]

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

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).

◆ MetricRecord() [3/4]

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

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

◆ MetricRecord() [4/4]

balm::MetricRecord::MetricRecord ( const MetricRecord original)
default

Create a metric record having the value of the specified 'original' record.

◆ ~MetricRecord()

balm::MetricRecord::~MetricRecord ( )
default

Member Function Documentation

◆ BSLMF_ASSERT()

balm::MetricRecord::BSLMF_ASSERT ( bsl::is_trivially_copyable< MetricId >::value  )

◆ BSLMF_NESTED_TRAIT_DECLARATION()

balm::MetricRecord::BSLMF_NESTED_TRAIT_DECLARATION ( MetricRecord  ,
bsl::is_trivially_copyable   
)

◆ count() [1/2]

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

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

◆ count() [2/2]

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

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

◆ max() [1/2]

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

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

◆ max() [2/2]

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

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

◆ metricId() [1/2]

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

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

◆ metricId() [2/2]

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

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

◆ min() [1/2]

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

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

◆ min() [2/2]

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

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

◆ operator=()

MetricRecord & balm::MetricRecord::operator= ( const MetricRecord rhs)
default

Assign to this metric record the value of the specified 'rhs' record, and return a reference to this modifiable record.

◆ print()

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.

◆ total() [1/2]

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

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

◆ total() [2/2]

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

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

Member Data Documentation

◆ DEFAULT_MAX

const double balm::MetricRecord::DEFAULT_MAX
static

◆ DEFAULT_MIN

const double balm::MetricRecord::DEFAULT_MIN
static

◆ k_DEFAULT_MAX

const double balm::MetricRecord::k_DEFAULT_MAX
static

◆ k_DEFAULT_MIN

const double balm::MetricRecord::k_DEFAULT_MIN
static

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