aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/encode/spack/spack_v1_decoder.cpp
diff options
context:
space:
mode:
authormsherbakov <msherbakov@yandex-team.ru>2022-02-10 16:49:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:17 +0300
commita0ffafe83b7d6229709a32fa942c71d672ac989c (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/monlib/encode/spack/spack_v1_decoder.cpp
parentc224a621661ddd69699f9476922eb316607ef57e (diff)
downloadydb-a0ffafe83b7d6229709a32fa942c71d672ac989c.tar.gz
Restoring authorship annotation for <msherbakov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/encode/spack/spack_v1_decoder.cpp')
-rw-r--r--library/cpp/monlib/encode/spack/spack_v1_decoder.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/monlib/encode/spack/spack_v1_decoder.cpp b/library/cpp/monlib/encode/spack/spack_v1_decoder.cpp
index b3be13f77c..1f445fc80d 100644
--- a/library/cpp/monlib/encode/spack/spack_v1_decoder.cpp
+++ b/library/cpp/monlib/encode/spack/spack_v1_decoder.cpp
@@ -9,8 +9,8 @@
#include <util/generic/yexception.h>
#include <util/generic/buffer.h>
-#include <util/generic/size_literals.h>
-#include <util/stream/format.h>
+#include <util/generic/size_literals.h>
+#include <util/stream/format.h>
#ifndef _little_endian_
#error Unsupported platform
@@ -20,8 +20,8 @@ namespace NMonitoring {
namespace {
#define DECODE_ENSURE(COND, ...) MONLIB_ENSURE_EX(COND, TSpackDecodeError() << __VA_ARGS__)
- constexpr ui64 LABEL_SIZE_LIMIT = 128_MB;
-
+ constexpr ui64 LABEL_SIZE_LIMIT = 128_MB;
+
///////////////////////////////////////////////////////////////////////
// TDecoderSpackV1
///////////////////////////////////////////////////////////////////////
@@ -63,20 +63,20 @@ namespace NMonitoring {
TimePrecision_ = DecodeTimePrecision(Header_.TimePrecision);
const ui64 labelSizeTotal = ui64(Header_.LabelNamesSize) + Header_.LabelValuesSize;
-
+
DECODE_ENSURE(labelSizeTotal <= LABEL_SIZE_LIMIT, "Label names & values size of " << HumanReadableSize(labelSizeTotal, SF_BYTES)
- << " exceeds the limit which is " << HumanReadableSize(LABEL_SIZE_LIMIT, SF_BYTES));
-
+ << " exceeds the limit which is " << HumanReadableSize(LABEL_SIZE_LIMIT, SF_BYTES));
+
// (2) read string pools
- TVector<char> namesBuf(Header_.LabelNamesSize);
- readBytes = In_->Load(namesBuf.data(), namesBuf.size());
+ TVector<char> namesBuf(Header_.LabelNamesSize);
+ readBytes = In_->Load(namesBuf.data(), namesBuf.size());
DECODE_ENSURE(readBytes == Header_.LabelNamesSize, "not enough data to read label names pool");
- TStringPool labelNames(namesBuf.data(), namesBuf.size());
+ TStringPool labelNames(namesBuf.data(), namesBuf.size());
- TVector<char> valuesBuf(Header_.LabelValuesSize);
- readBytes = In_->Load(valuesBuf.data(), valuesBuf.size());
+ TVector<char> valuesBuf(Header_.LabelValuesSize);
+ readBytes = In_->Load(valuesBuf.data(), valuesBuf.size());
DECODE_ENSURE(readBytes == Header_.LabelValuesSize, "not enough data to read label values pool");
- TStringPool labelValues(valuesBuf.data(), valuesBuf.size());
+ TStringPool labelValues(valuesBuf.data(), valuesBuf.size());
// (3) read common time
c->OnCommonTime(ReadTime());