8#ifndef INCLUDED_BALM_METRICSAMPLE
9#define INCLUDED_BALM_METRICSAMPLE
170#include <balscm_version.h>
182#include <bsl_iosfwd.h>
183#include <bsl_vector.h>
297 bsl::ostream&
print(bsl::ostream& stream,
299 int spacesPerLevel = 4)
const;
477 bsl::ostream&
print(bsl::ostream& stream,
479 int spacesPerLevel = 4)
const;
523: d_records_p(records)
524, d_numRecords(numRecords)
525, d_elapsedTime(elapsedTime)
531: d_records_p(original.d_records_p)
532, d_numRecords(original.d_numRecords)
533, d_elapsedTime(original.d_elapsedTime)
541 d_records_p = rhs.d_records_p;
542 d_numRecords = rhs.d_numRecords;
543 d_elapsedTime = rhs.d_elapsedTime;
577 return d_elapsedTime;
589 return d_records_p + d_numRecords;
597 const MetricSampleGroup& rhs)
599 return lhs.records() == rhs.records()
600 && lhs.numRecords() == rhs.numRecords()
601 && lhs.elapsedTime() == rhs.elapsedTime();
606 const MetricSampleGroup& rhs)
608 return !(lhs == rhs);
613 const MetricSampleGroup& rhs)
615 return rhs.print(stream, 0, -1);
627, d_records(basicAllocator)
648 d_records.push_back(group);
675 return d_records[index];
687 return d_records.begin();
693 return d_records.end();
699 return static_cast<int>(d_records.size());
713 return lhs.d_timeStamp == rhs.d_timeStamp
714 && lhs.d_records == rhs.d_records;
720 return !(lhs == rhs);
724bsl::ostream&
balm::operator<<(bsl::ostream& stream,
const MetricSample& rhs)
726 return rhs.print(stream, 0, -1);
Definition balm_metricrecord.h:217
Definition balm_metricsample.h:199
const_iterator end() const
Definition balm_metricsample.h:587
const MetricRecord * const_iterator
Definition balm_metricsample.h:214
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
void setElapsedTime(const bsls::TimeInterval &elapsedTime)
Definition balm_metricsample.h:548
~MetricSampleGroup()=default
Destroy this object.
MetricSampleGroup & operator=(const MetricSampleGroup &rhs)
Definition balm_metricsample.h:539
const MetricRecord * records() const
Definition balm_metricsample.h:563
const bsls::TimeInterval & elapsedTime() const
Definition balm_metricsample.h:575
void setRecords(const MetricRecord *records, int numRecords)
Definition balm_metricsample.h:554
const_iterator begin() const
Definition balm_metricsample.h:581
MetricSampleGroup()
Definition balm_metricsample.h:512
int numRecords() const
Definition balm_metricsample.h:569
Definition balm_metricsample.h:342
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
BSLMF_NESTED_TRAIT_DECLARATION(MetricSample, bslma::UsesBslmaAllocator)
friend bool operator==(const MetricSample &lhs, const MetricSample &rhs)
void removeAllRecords()
Remove all metric records from this sample.
Definition balm_metricsample.h:665
const_iterator end() const
Definition balm_metricsample.h:691
void setTimeStamp(const bdlt::DatetimeTz &timeStamp)
Definition balm_metricsample.h:639
MetricSample & operator=(const MetricSample &rhs)
void appendGroup(const MetricSampleGroup &group)
Definition balm_metricsample.h:645
const_iterator begin() const
Definition balm_metricsample.h:685
const MetricSampleGroup & sampleGroup(int index) const
Definition balm_metricsample.h:673
const bdlt::DatetimeTz & timeStamp() const
Return a reference to the non-modifiable timestamp for this sample.
Definition balm_metricsample.h:679
~MetricSample()
Destroy this metric sample.
Definition balm_metricsample.h:633
MetricSample(const MetricSample &original, bslma::Allocator *basicAllocator=0)
int numGroups() const
Definition balm_metricsample.h:697
int numRecords() const
Definition balm_metricsample.h:703
bsl::vector< MetricSampleGroup >::const_iterator const_iterator
Definition balm_metricsample.h:364
MetricSample(bslma::Allocator *basicAllocator=0)
Definition balm_metricsample.h:625
Definition bdlt_datetimetz.h:308
Definition bslstl_vector.h:1025
VALUE_TYPE const * const_iterator
Definition bslstl_vector.h:1058
Definition bslma_allocator.h:457
Definition bsls_timeinterval.h:301
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition balm_bdlmmetricsadapter.h:141
bool operator==(const IntegerMetric &lhs, const IntegerMetric &rhs)
bsl::ostream & operator<<(bsl::ostream &stream, const Category &rhs)
bool operator!=(const IntegerMetric &lhs, const IntegerMetric &rhs)
Definition bslma_usesbslmaallocator.h:343