From 7f3687e98980848fa8e9e22d896bfeccb64d5822 Mon Sep 17 00:00:00 2001 From: Ruslan Nigmatullin Date: Wed, 31 May 2023 13:10:37 -0700 Subject: [PATCH] add comments --- .../opentelemetry/sdk/metrics/data/circular_buffer.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sdk/include/opentelemetry/sdk/metrics/data/circular_buffer.h b/sdk/include/opentelemetry/sdk/metrics/data/circular_buffer.h index d66f9b38b8..1608a3a011 100644 --- a/sdk/include/opentelemetry/sdk/metrics/data/circular_buffer.h +++ b/sdk/include/opentelemetry/sdk/metrics/data/circular_buffer.h @@ -143,9 +143,13 @@ class AdaptingCircularBufferCounter static constexpr int32_t kNullIndex = std::numeric_limits::min(); + // Index of the first populated element, may be kNullIndex if container is empty. int32_t start_index_ = kNullIndex; - int32_t end_index_ = kNullIndex; - int32_t base_index_ = kNullIndex; + // Index of the last populated element, may be kNullIndex if container is empty. + int32_t end_index_ = kNullIndex; + // Index corresponding to the element located at the start of the backing array, may be kNullIndex + // if container is empty. + int32_t base_index_ = kNullIndex; AdaptingIntegerArray backing_; };