From 3d0482282e18b411f550f23eb78f8c491b66dd0a Mon Sep 17 00:00:00 2001 From: Christian von Elm Date: Fri, 20 Oct 2023 11:08:12 +0200 Subject: [PATCH] Add comment --- src/perf/counter/userspace/writer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/perf/counter/userspace/writer.cpp b/src/perf/counter/userspace/writer.cpp index c72f549b..4e4875ad 100644 --- a/src/perf/counter/userspace/writer.cpp +++ b/src/perf/counter/userspace/writer.cpp @@ -52,6 +52,8 @@ bool Writer::handle(std::vector& data) for (std::size_t i = 0; i < counter_buffer_.size(); i++) { + // In get_scale, index 0 is reserved for the metric leader, which we don't have in the + // userspace metric mode, so add 1 to the counter index values[i] = counter_buffer_[i] * counter_collection_.get_scale(i + 1); }