31 return this->startTime_;
36 return this->timestamp_;
42 this->startTime_ = std::move(startTime);
47 this->timestamp_ = std::move(endTime);
53 return this->indexes_;
58 this->indexes_ = std::move(indexes);
59 this->values_.clear();
61 for (
size_t i : this->indexes_)
62 this->values_.emplace_back(i, this->data_[i]);
68 return this->indexes_.size();
const std::chrono::system_clock::time_point & endTime() const noexcept
Get time of latest metrics.
MetricsStatsArray() noexcept
Construct a new Metrics Stats Array object.
Generic class to store and manage metrics.
void setEndTime(std::chrono::system_clock::time_point endTime) noexcept
Set the time of latest metrics used to compute statistics.
const std::set< size_t > & indexes() const noexcept
Returns set of requested metrics.
const std::vector< IndexedValue > & indexedValues() const noexcept
Returns the requested metric indexes and values.
size_t indexCount() const noexcept
Returns the number of requested metrics.
void setStartTime(std::chrono::system_clock::time_point startTime) noexcept
Set the time of earlier metrics used to compute statistics.
const std::chrono::system_clock::time_point & startTime() const noexcept
Get time of earlier metrics.
void setIndexes(std::set< size_t > indexes) noexcept
Set which indexes are requested.