[#BloombergLP-balm-MetricSample-2constructor-0f] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balm.adoc[balm]::xref:BloombergLP/balm/MetricSample.adoc[MetricSample]::MetricSample :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<balm_metricsample.h>` Create an empty metric sample. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/balm/MetricSample/2constructor-0e.adoc[MetricSample](xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/balm/MetricSample/2constructor-0e.adoc[_» more..._]# Create a metric sample containing the same value as the specified `original` sample. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. Note that copying the contained `MetricSampleGroup` objects copies only the pointers to their respective `MetricRecord` arrays, and does not copy the records themselves; hence, these record arrays must remain valid for the productive lifetimes of all copied objects or until the records are removed by calling `removeAllRecords`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/balm/MetricSample/2constructor-07.adoc[MetricSample]( xref:BloombergLP/balm/MetricSample.adoc[MetricSample] const& original, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/balm/MetricSample/2constructor-07.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#