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
commit47af3b5bf148ddab250833ec454d30d7c4930c31 (patch)
tree9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/monlib/metrics/metric_value.h
parent1715700d00b30399d3648be821fd585ae552365e (diff)
downloadydb-47af3b5bf148ddab250833ec454d30d7c4930c31.tar.gz
Restoring authorship annotation for <gusev-p@yandex-team.ru>. Commit 2 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 5f235e7a0b..607fcc8602 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_),