[#BloombergLP-balm-MetricSampleGroup-2constructor-05]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/MetricSampleGroup.adoc[MetricSampleGroup]::MetricSampleGroup
:relfileprefix: ../../../
:mrdocs:

Create a sample group from the specified records and elapsed time&period;

== Synopsis

Declared in `&lt;balm&lowbar;metricsample&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
MetricSampleGroup(
    xref:BloombergLP/balm/MetricRecord.adoc[MetricRecord] const* records,
    int numRecords,
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& elapsedTime);
----

== Description

Create a sample group containing the specified sequence of `records` of specified length `numRecords`, recorded over a period whose duration is the specified `elapsedTime`&period; The behavior is undefined unless `0 &lt;&equals; numRecords` and `records` points to a contiguous sequence of (at least) `numRecords` metric records&period; 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&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *records*
| contiguous sequence of metric records (held, not owned)
| *numRecords*
| number of records in `records`
| *elapsedTime*
| duration over which the records were collected
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
