diff options
Diffstat (limited to 'library/cpp/monlib/encode/prometheus')
-rw-r--r-- | library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp | 4 | ||||
-rw-r--r-- | library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp b/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp index 313651ba8f..16a08f4781 100644 --- a/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp +++ b/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp @@ -219,7 +219,7 @@ namespace NMonitoring { private: bool HasRemaining() const noexcept { - return CurrentPos_ < Data_.Size(); + return CurrentPos_ < Data_.size(); } // # 'TYPE' metric_name {counter|gauge|histogram|summary|untyped} @@ -234,7 +234,7 @@ namespace NMonitoring { SkipSpaces(); TStringBuf nextName = ReadTokenAsMetricName(); - Y_PARSER_ENSURE(!nextName.Empty(), "invalid metric name"); + Y_PARSER_ENSURE(!nextName.empty(), "invalid metric name"); SkipSpaces(); EPrometheusMetricType nextType = ReadType(); diff --git a/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp b/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp index 8083221b63..66c0f55b43 100644 --- a/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp +++ b/library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp @@ -106,7 +106,7 @@ namespace NMonitoring { private: // will replace invalid chars with '_' void WriteMetricName(TStringBuf name) { - Y_ENSURE(!name.Empty(), "trying to write metric with empty name"); + Y_ENSURE(!name.empty(), "trying to write metric with empty name"); char ch = name[0]; if (NPrometheus::IsValidMetricNameStart(ch)) { @@ -133,7 +133,7 @@ namespace NMonitoring { WriteLabelValue(l.Value()); Out_->Write(", "); // trailign comma is supported in parsers } - if (!addLabelKey.Empty() && !addLabelValue.Empty()) { + if (!addLabelKey.empty() && !addLabelValue.empty()) { Out_->Write(addLabelKey); Out_->Write('='); WriteLabelValue(addLabelValue); @@ -164,12 +164,12 @@ namespace NMonitoring { { // (1) name WriteMetricName(name); - if (!suffix.Empty()) { + if (!suffix.empty()) { Out_->Write(suffix); } // (2) labels - if (!labels.Empty() || !addLabelKey.Empty()) { + if (!labels.Empty() || !addLabelKey.empty()) { WriteLabels(labels, addLabelKey, addLabelValue); } Out_->Write(' '); |