aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/metrics/metric_value.h
diff options
context:
space:
mode:
authorgusev-p <gusev-p@yandex-team.ru>2022-02-10 16:47:20 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:20 +0300
commit1715700d00b30399d3648be821fd585ae552365e (patch)
tree6857a59158ea36e56d87fb32fbb8e44673c0ca0f /library/cpp/monlib/metrics/metric_value.h
parentb23c1d7a8015c2006a148fd93b84cdeb0aee17a3 (diff)
downloadydb-1715700d00b30399d3648be821fd585ae552365e.tar.gz
Restoring authorship annotation for <gusev-p@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/monlib/metrics/metric_value.h')
-rw-r--r--library/cpp/monlib/metrics/metric_value.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/monlib/metrics/metric_value.h b/library/cpp/monlib/metrics/metric_value.h
index 607fcc8602..5f235e7a0b 100644
--- a/library/cpp/monlib/metrics/metric_value.h
+++ b/library/cpp/monlib/metrics/metric_value.h
@@ -384,35 +384,35 @@ namespace NMonitoring {
template <typename T>
void Add(TInstant time, T value) {
- Add(TPoint(time, value), TValueType<T>::Type);
- }
-
- void Add(TPoint point, EMetricValueType valueType) {
+ Add(TPoint(time, value), TValueType<T>::Type);
+ }
+
+ void Add(TPoint point, EMetricValueType valueType) {
if (Empty()) {
- ValueType_ = valueType;
+ ValueType_ = valueType;
} else {
- CheckTypes(ValueType_, valueType);
+ CheckTypes(ValueType_, valueType);
}
- Points_.push_back(point);
+ Points_.push_back(point);
if (ValueType_ == EMetricValueType::SUMMARY) {
- TPoint& p = Points_.back();
- p.GetValue().AsSummaryDouble()->Ref();
+ TPoint& p = Points_.back();
+ p.GetValue().AsSummaryDouble()->Ref();
} else if (ValueType_ == EMetricValueType::HISTOGRAM) {
- TPoint& p = Points_.back();
- p.GetValue().AsHistogram()->Ref();
+ TPoint& p = Points_.back();
+ p.GetValue().AsHistogram()->Ref();
} else if (ValueType_ == EMetricValueType::LOGHISTOGRAM) {
- TPoint& p = Points_.back();
- p.GetValue().AsLogHistogram()->Ref();
+ TPoint& p = Points_.back();
+ p.GetValue().AsLogHistogram()->Ref();
}
}
void CopyFrom(const TMetricTimeSeries& other) {
- if (Empty()) {
- ValueType_ = other.ValueType_;
- } else {
- CheckTypes(GetValueType(), other.GetValueType());
- }
+ if (Empty()) {
+ ValueType_ = other.ValueType_;
+ } else {
+ CheckTypes(GetValueType(), other.GetValueType());
+ }
size_t prevSize = Points_.size();
Copy(std::begin(other.Points_), std::end(other.Points_),