aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/encode/prometheus
diff options
context:
space:
mode:
authortobo <tobo@yandex-team.ru>2022-02-10 16:47:27 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:27 +0300
commit55a7f90e4cd31e9481cace8ee5dfd682c27e810e (patch)
tree9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/monlib/encode/prometheus
parent7fe839092527589b38f014d854c51565b3c1adfa (diff)
downloadydb-55a7f90e4cd31e9481cace8ee5dfd682c27e810e.tar.gz
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/encode/prometheus')
-rw-r--r--library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp10
-rw-r--r--library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp2
-rw-r--r--library/cpp/monlib/encode/prometheus/prometheus_model.h14
3 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp b/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp
index 0cdecebcfa..7e81357dbd 100644
--- a/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp
+++ b/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp
@@ -22,7 +22,7 @@
namespace NMonitoring {
namespace {
- constexpr ui32 MAX_LABEL_VALUE_LEN = 256;
+ constexpr ui32 MAX_LABEL_VALUE_LEN = 256;
using TLabelsMap = THashMap<TString, TString>;
@@ -225,7 +225,7 @@ namespace NMonitoring {
SkipSpaces();
TStringBuf keyword = ReadToken();
- if (keyword == TStringBuf("TYPE")) {
+ if (keyword == TStringBuf("TYPE")) {
SkipSpaces();
TStringBuf nextName = ReadTokenAsMetricName();
@@ -561,11 +561,11 @@ namespace NMonitoring {
}
double ParseGoDouble(TStringBuf str) {
- if (str == TStringBuf("+Inf")) {
+ if (str == TStringBuf("+Inf")) {
return std::numeric_limits<double>::infinity();
- } else if (str == TStringBuf("-Inf")) {
+ } else if (str == TStringBuf("-Inf")) {
return -std::numeric_limits<double>::infinity();
- } else if (str == TStringBuf("NaN")) {
+ } else if (str == TStringBuf("NaN")) {
return NAN;
}
diff --git a/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp b/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp
index 7eee2d709d..15efeb8c03 100644
--- a/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp
+++ b/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp
@@ -71,7 +71,7 @@ namespace NMonitoring {
TBucketBound bound = h->UpperBound(i);
TStringBuf boundStr;
if (bound == HISTOGRAM_INF_BOUND) {
- boundStr = TStringBuf("+Inf");
+ boundStr = TStringBuf("+Inf");
} else {
size_t len = FloatToString(bound, TmpBuf_, Y_ARRAY_SIZE(TmpBuf_));
boundStr = TStringBuf(TmpBuf_, len);
diff --git a/library/cpp/monlib/encode/prometheus/prometheus_model.h b/library/cpp/monlib/encode/prometheus/prometheus_model.h
index 377934f8b4..cb7f2cb15b 100644
--- a/library/cpp/monlib/encode/prometheus/prometheus_model.h
+++ b/library/cpp/monlib/encode/prometheus/prometheus_model.h
@@ -13,16 +13,16 @@ namespace NPrometheus {
// and https://github.com/prometheus/common/blob/master/expfmt/text_parse.go
//
- inline constexpr TStringBuf BUCKET_SUFFIX = "_bucket";
- inline constexpr TStringBuf COUNT_SUFFIX = "_count";
- inline constexpr TStringBuf SUM_SUFFIX = "_sum";
- inline constexpr TStringBuf MIN_SUFFIX = "_min";
- inline constexpr TStringBuf MAX_SUFFIX = "_max";
- inline constexpr TStringBuf LAST_SUFFIX = "_last";
+ inline constexpr TStringBuf BUCKET_SUFFIX = "_bucket";
+ inline constexpr TStringBuf COUNT_SUFFIX = "_count";
+ inline constexpr TStringBuf SUM_SUFFIX = "_sum";
+ inline constexpr TStringBuf MIN_SUFFIX = "_min";
+ inline constexpr TStringBuf MAX_SUFFIX = "_max";
+ inline constexpr TStringBuf LAST_SUFFIX = "_last";
// Used for the label that defines the upper bound of a bucket of a
// histogram ("le" -> "less or equal").
- inline constexpr TStringBuf BUCKET_LABEL = "le";
+ inline constexpr TStringBuf BUCKET_LABEL = "le";
inline bool IsValidLabelNameStart(char ch) {