aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/encode/prometheus
diff options
context:
space:
mode:
authormikhnenko <mikhnenko@yandex-team.com>2024-10-04 09:58:47 +0300
committermikhnenko <mikhnenko@yandex-team.com>2024-10-04 10:14:38 +0300
commit9ad2894d3a432775a19303a5e8b7a79092017963 (patch)
tree5e53ebb5a41c45938a332cb8f13ed320047411b5 /library/cpp/monlib/encode/prometheus
parent8b94a751187ed4a463b7f37023098505492d4574 (diff)
downloadydb-9ad2894d3a432775a19303a5e8b7a79092017963.tar.gz
Remove Size, Empty and Data usages from library
commit_hash:ef5ad4cfa9e68bbfc586492e8c376c732d0a48af
Diffstat (limited to 'library/cpp/monlib/encode/prometheus')
-rw-r--r--library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp4
-rw-r--r--library/cpp/monlib/encode/prometheus/prometheus_encoder.cpp8
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(' ');