[#BloombergLP-balm-IntegerMetric] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::IntegerMetric :relfileprefix: ../../ :mrdocs: This class provides an in‐core value‐semantic type for recording integer metric values. == Synopsis Declared in `<balm_integermetric.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class IntegerMetric; ---- == Description The value of a `IntegerMetric` object is characterized by the `IntegerCollector` object it uses to collect metric‐event values. Each instance of this class establishes (at construction) an association to an `IntegerCollector` object to which the metric delegates. A `IntegerMetric` value is constant after construction (i.e., it does not support assignment or provide manipulators that modify its collector value), so that synchronization primitives are not required to protect its data members. Note that if a collector or metrics manager is not supplied at construction, and if the default metrics manager has not been instantiated, then the metric will be inactive (i.e., `isActive()` is `false`) and the manipulator methods of the integer metric object will have no effect. == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balm/IntegerMetric/2constructor-0f7.adoc[`IntegerMetric`] [.small]#[constructor]# | Constructors | xref:BloombergLP/balm/IntegerMetric/accumulateCountTotalMinMax.adoc[`accumulateCountTotalMinMax`] | Accumulate the specified count, total, min, and max into this metric. | xref:BloombergLP/balm/IntegerMetric/collector-07.adoc[`collector`] | `collector` overloads | xref:BloombergLP/balm/IntegerMetric/increment.adoc[`increment`] | Increase the count and total of this integer metric by 1. | xref:BloombergLP/balm/IntegerMetric/isActive.adoc[`isActive`] | Return `true` if this integer metric will actively record metrics. | xref:BloombergLP/balm/IntegerMetric/metricId.adoc[`metricId`] | Return a `MetricId` object identifying this integer metric. | xref:BloombergLP/balm/IntegerMetric/update.adoc[`update`] | Update this integer metric with the specified `value`. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balm/IntegerMetric/lookupCollector-038.adoc[`lookupCollector`] | `lookupCollector` overloads |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balm/operator_not_eq-0c.adoc[`operator!=`] | Return `true` if `lhs` and `rhs` do not have the same value. | xref:BloombergLP/balm/operator_eq-0eb.adoc[`operator==`] | Return `true` if the specified `lhs` and `rhs` have the same value. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#