[#BloombergLP-balm-MetricSampleGroup] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::MetricSampleGroup :relfileprefix: ../../ :mrdocs: This class provides an _in‐core_ value‐semantic representation of a group of metric record values. This class contains the address of an array of (externally managed) `MetricRecord` objects, the number of records in that array, and an elapsed time value (used to indicate the time span over which the metric values were aggregated). == Synopsis Declared in `<balm_metricsample.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class MetricSampleGroup; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balm/MetricSampleGroup/const_iterator.adoc[`const_iterator`] | A `const_iterator` is an alias for an iterator over the non‐modifiable records referenced in a `MetricSampleGroup`. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balm/MetricSampleGroup/2constructor-0f.adoc[`MetricSampleGroup`] [.small]#[constructor]# | Constructors | xref:BloombergLP/balm/MetricSampleGroup/operator_assign.adoc[`operator=`] | Assign to this sample group the value of the specified `rhs` sample group, and return a reference to this modifiable sample group. Note that only the pointer to the `MetricRecord` array and the length are copied, and not the records themselves. | xref:BloombergLP/balm/MetricSampleGroup/begin.adoc[`begin`] | Return an iterator positioned at the beginning of the sequence of `MetricRecord` objects referenced by this object. | xref:BloombergLP/balm/MetricSampleGroup/elapsedTime.adoc[`elapsedTime`] | Return a reference to the non‐modifiable elapsed time interval over which this object's metric records were aggregated. | xref:BloombergLP/balm/MetricSampleGroup/end.adoc[`end`] | Return an iterator positioned one past the final `MetricRecord` object in the sequence of records referenced by this object. | xref:BloombergLP/balm/MetricSampleGroup/numRecords.adoc[`numRecords`] | Return the number of records (referenced to by `records()`) in this object. | xref:BloombergLP/balm/MetricSampleGroup/print.adoc[`print`] | Format this object to the specified output `stream` at the (absolute value of) the optionally specified indentation `level` and return a reference to `stream`. If `level` is specified, optionally specify `spacesPerLevel`, the number of spaces per indentation level for this and all of its nested objects. If `level` is negative, suppress indentation of the first line. If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`). If `stream` is not valid on entry, this operation has no effect. | xref:BloombergLP/balm/MetricSampleGroup/records.adoc[`records`] | Return the address of the contiguous sequence of non‐modifiable records of length `numRecords()`. | xref:BloombergLP/balm/MetricSampleGroup/setElapsedTime.adoc[`setElapsedTime`] | Set the elapsed time (used to indicate the time span over which this object's metric records were aggregated) to the specified `elapsedTime`. | xref:BloombergLP/balm/MetricSampleGroup/setRecords.adoc[`setRecords`] | Set the sequence of records referred to by this sample group to the specified sequence of `records` of specified length `numRecords`. The behavior is undefined unless `0 <= numRecords`, and `records` refers to a contiguous sequence of (at least) `numRecords`. Note that the contents of `records` is _not_ copied and the supplied array must remain valid for the productive lifetime of this object or until the records are set to a different sequence by calling the `setRecords` manipulator. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balm/operator_not_eq-095.adoc[`operator!=`] | Return `true` if the specified `lhs` and `rhs` sample groups do not have the same value, and `false` otherwise. Two sample groups do not have the same value if any of the respective record‐sequence addresses, number of records, or elapsed time, are not the same. | xref:BloombergLP/balm/operator_eq-08.adoc[`operator==`] | Return `true` if the specified `lhs` and `rhs` sample groups have the same value, and `false` otherwise. Two sample groups have the same value if the respective record sequence‐addresses, number of records, and elapsed time are the same. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#