#include "metric_value.h" namespace NMonitoring { void TMetricTimeSeries::SortByTs() { SortPointsByTs(ValueType_, Points_); } void TMetricTimeSeries::Clear() noexcept { if (ValueType_ == EMetricValueType::HISTOGRAM) { for (TPoint& p: Points_) { SnapshotUnRef(p); } } else if (ValueType_ == EMetricValueType::SUMMARY) { for (TPoint& p: Points_) { SnapshotUnRef(p); } } else if (ValueType_ == EMetricValueType::LOGHISTOGRAM) { for (TPoint& p: Points_) { SnapshotUnRef(p); } } Points_.clear(); ValueType_ = EMetricValueType::UNKNOWN; } }