BDE 4.14.0 Production release
|
#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. | |
MetricRecord & | operator= (const MetricRecord &rhs)=default |
MetricId & | metricId () |
int & | count () |
double & | total () |
double & | max () |
double & | min () |
const MetricId & | metricId () 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 |
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).
|
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).
|
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).
|
inline |
Create a metric record having the specified metricId
, count
, total
, min
, and max
attribute values.
|
default |
Create a metric record having the value of the specified 'original' record.
|
default |
balm::MetricRecord::BSLMF_ASSERT | ( | bsl::is_trivially_copyable< MetricId >::value | ) |
balm::MetricRecord::BSLMF_NESTED_TRAIT_DECLARATION | ( | MetricRecord | , |
bsl::is_trivially_copyable | |||
) |
|
inline |
Return a reference to the modifiable count
attribute representing the number of individually recorded values.
|
inline |
Return a reference to the non-modifiable count
attribute representing the number of individually recorded values.
|
inline |
Return a reference to the modifiable max
attribute representing the maximum of the individually recorded values.
|
inline |
Return a reference to the non-modifiable max
attribute representing the maximum of the individually recorded values.
|
inline |
Return a reference to the modifiable metricId
attribute representing the identifier for the metric being recorded.
|
inline |
Return a reference to the non-modifiable metricId
attribute representing the identifier for the metric being recorded.
|
inline |
Return a reference to the modifiable min
attribute representing the minimum of the individually recorded values.
|
inline |
Return a reference to the non-modifiable min
attribute representing the minimum of the individually recorded values.
|
default |
Assign to this metric record the value of the specified 'rhs' record, and return a reference to this modifiable record.
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
.
|
inline |
Return a reference to the modifiable total
attribute representing the sum of the individually recorded values.
|
inline |
Return a reference to the non-modifiable total
attribute representing the sum of the individually recorded values.
|
static |
|
static |
|
static |
|
static |