diff options
| author | gusev-p <[email protected]> | 2022-02-10 16:47:20 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:47:20 +0300 | 
| commit | 1715700d00b30399d3648be821fd585ae552365e (patch) | |
| tree | 6857a59158ea36e56d87fb32fbb8e44673c0ca0f /library/cpp/monlib/metrics/metric_value.h | |
| parent | b23c1d7a8015c2006a148fd93b84cdeb0aee17a3 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/monlib/metrics/metric_value.h')
| -rw-r--r-- | library/cpp/monlib/metrics/metric_value.h | 36 | 
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 607fcc86022..5f235e7a0b3 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_),  | 
