aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib
diff options
context:
space:
mode:
authorilnurkh <ilnurkh@yandex-team.com>2023-10-16 20:19:28 +0300
committerilnurkh <ilnurkh@yandex-team.com>2023-10-16 20:52:22 +0300
commit23b4cd86157da8b9f0f8acd5ef46acfab39669db (patch)
tree09572627315c6029e0434702e8330c557476ff06 /library/cpp/monlib
parent05d934cd8bfcf7ce4b6241d6bd2914cc776877f9 (diff)
downloadydb-23b4cd86157da8b9f0f8acd5ef46acfab39669db.tar.gz
Y_VERIFY_DEBUG->Y_DEBUG_ABORT_UNLESS at '-v ydb'
https://clubs.at.yandex-team.ru/arcadia/29404
Diffstat (limited to 'library/cpp/monlib')
-rw-r--r--library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp8
-rw-r--r--library/cpp/monlib/metrics/atomics_array.h4
-rw-r--r--library/cpp/monlib/metrics/histogram_snapshot.h4
-rw-r--r--library/cpp/monlib/metrics/labels.h4
-rw-r--r--library/cpp/monlib/metrics/log_histogram_collector.h4
-rw-r--r--library/cpp/monlib/metrics/timer.h2
6 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 29441c88c3..d37961a241 100644
--- a/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp
+++ b/library/cpp/monlib/encode/prometheus/prometheus_decoder.cpp
@@ -426,7 +426,7 @@ namespace NMonitoring {
}
TStringBuf ReadToken() {
- Y_VERIFY_DEBUG(CurrentPos_ > 0);
+ Y_DEBUG_ABORT_UNLESS(CurrentPos_ > 0);
size_t begin = CurrentPos_ - 1; // read first byte again
while (HasRemaining() && !IsSpace(CurrentByte_) && CurrentByte_ != '\n') {
ReadNextByteUnsafe();
@@ -439,7 +439,7 @@ namespace NMonitoring {
return "";
}
- Y_VERIFY_DEBUG(CurrentPos_ > 0);
+ Y_DEBUG_ABORT_UNLESS(CurrentPos_ > 0);
size_t begin = CurrentPos_ - 1; // read first byte again
while (HasRemaining()) {
ReadNextByteUnsafe();
@@ -455,7 +455,7 @@ namespace NMonitoring {
return "";
}
- Y_VERIFY_DEBUG(CurrentPos_ > 0);
+ Y_DEBUG_ABORT_UNLESS(CurrentPos_ > 0);
size_t begin = CurrentPos_ - 1; // read first byte again
while (HasRemaining()) {
ReadNextByteUnsafe();
@@ -506,7 +506,7 @@ namespace NMonitoring {
}
TStringBuf TokenFromPos(size_t begin) {
- Y_VERIFY_DEBUG(CurrentPos_ > begin);
+ Y_DEBUG_ABORT_UNLESS(CurrentPos_ > begin);
size_t len = CurrentPos_ - begin - 1;
if (len == 0) {
return {};
diff --git a/library/cpp/monlib/metrics/atomics_array.h b/library/cpp/monlib/metrics/atomics_array.h
index 4a26c8186a..876c167938 100644
--- a/library/cpp/monlib/metrics/atomics_array.h
+++ b/library/cpp/monlib/metrics/atomics_array.h
@@ -18,7 +18,7 @@ namespace NMonitoring {
}
ui64 operator[](size_t index) const noexcept {
- Y_VERIFY_DEBUG(index < Size_);
+ Y_DEBUG_ABORT_UNLESS(index < Size_);
return Values_[index].load(std::memory_order_relaxed);
}
@@ -27,7 +27,7 @@ namespace NMonitoring {
}
void Add(size_t index, ui64 count) noexcept {
- Y_VERIFY_DEBUG(index < Size_);
+ Y_DEBUG_ABORT_UNLESS(index < Size_);
Values_[index].fetch_add(count, std::memory_order_relaxed);
}
diff --git a/library/cpp/monlib/metrics/histogram_snapshot.h b/library/cpp/monlib/metrics/histogram_snapshot.h
index 05cb174fa8..6cd9f1dab5 100644
--- a/library/cpp/monlib/metrics/histogram_snapshot.h
+++ b/library/cpp/monlib/metrics/histogram_snapshot.h
@@ -187,12 +187,12 @@ namespace NMonitoring {
}
TBucket& Bucket(ui32 index) noexcept {
- Y_VERIFY_DEBUG(index < BucketsCount_);
+ Y_DEBUG_ABORT_UNLESS(index < BucketsCount_);
return *(reinterpret_cast<TBucket*>(this + 1) + index);
}
const TBucket& Bucket(ui32 index) const noexcept {
- Y_VERIFY_DEBUG(index < BucketsCount_);
+ Y_DEBUG_ABORT_UNLESS(index < BucketsCount_);
return *(reinterpret_cast<const TBucket*>(this + 1) + index);
}
diff --git a/library/cpp/monlib/metrics/labels.h b/library/cpp/monlib/metrics/labels.h
index 7e18e88161..1f86e7ffaf 100644
--- a/library/cpp/monlib/metrics/labels.h
+++ b/library/cpp/monlib/metrics/labels.h
@@ -141,12 +141,12 @@ namespace NMonitoring {
}
const ILabel* operator->() const noexcept {
- Y_VERIFY_DEBUG(Labels_);
+ Y_DEBUG_ABORT_UNLESS(Labels_);
return Labels_->Get(Idx_);
}
const ILabel& operator*() const noexcept {
- Y_VERIFY_DEBUG(Labels_);
+ Y_DEBUG_ABORT_UNLESS(Labels_);
return *Labels_->Get(Idx_);
}
diff --git a/library/cpp/monlib/metrics/log_histogram_collector.h b/library/cpp/monlib/metrics/log_histogram_collector.h
index b81f84ebf3..30beaa1908 100644
--- a/library/cpp/monlib/metrics/log_histogram_collector.h
+++ b/library/cpp/monlib/metrics/log_histogram_collector.h
@@ -101,7 +101,7 @@ namespace NMonitoring {
}
int ExtendUp(int expectedIndex) {
- Y_VERIFY_DEBUG(expectedIndex >= (int) Buckets_.size());
+ Y_DEBUG_ABORT_UNLESS(expectedIndex >= (int) Buckets_.size());
const size_t toAdd = expectedIndex - Buckets_.size() + 1;
const size_t newSize = Buckets_.size() + toAdd;
if (newSize <= MAX_BUCKETS) {
@@ -126,7 +126,7 @@ namespace NMonitoring {
}
int ExtendDown(int expectedIndex, int margin) {
- Y_VERIFY_DEBUG(expectedIndex <= 0);
+ Y_DEBUG_ABORT_UNLESS(expectedIndex <= 0);
int toAdd = std::min<int>(MAX_BUCKETS - Buckets_.size(), margin - expectedIndex);
if (toAdd > 0) {
Buckets_.insert(Buckets_.begin(), toAdd, 0.0);
diff --git a/library/cpp/monlib/metrics/timer.h b/library/cpp/monlib/metrics/timer.h
index 5c4e26e37b..93e5e7eb27 100644
--- a/library/cpp/monlib/metrics/timer.h
+++ b/library/cpp/monlib/metrics/timer.h
@@ -40,7 +40,7 @@ namespace NMonitoring {
}
void Record() {
- Y_VERIFY_DEBUG(Metric_);
+ Y_DEBUG_ABORT_UNLESS(Metric_);
if (Metric_ == nullptr) {
return;
}