diff options
author | tobo <tobo@yandex-team.ru> | 2022-02-10 16:47:27 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:27 +0300 |
commit | 55a7f90e4cd31e9481cace8ee5dfd682c27e810e (patch) | |
tree | 9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/monlib/encode/unistat | |
parent | 7fe839092527589b38f014d854c51565b3c1adfa (diff) | |
download | ydb-55a7f90e4cd31e9481cace8ee5dfd682c27e810e.tar.gz |
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/encode/unistat')
-rw-r--r-- | library/cpp/monlib/encode/unistat/unistat_decoder.cpp | 4 | ||||
-rw-r--r-- | library/cpp/monlib/encode/unistat/unistat_ut.cpp | 22 |
2 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/monlib/encode/unistat/unistat_decoder.cpp b/library/cpp/monlib/encode/unistat/unistat_decoder.cpp index 7497ae1f79..b2344b0905 100644 --- a/library/cpp/monlib/encode/unistat/unistat_decoder.cpp +++ b/library/cpp/monlib/encode/unistat/unistat_decoder.cpp @@ -156,9 +156,9 @@ namespace NMonitoring { Y_ENSURE(suffix.size() >= 3 && suffix.size() <= 5, "Disallowed suffix value: " << suffix); - if (suffix == TStringBuf("summ") || suffix == TStringBuf("hgram")) { + if (suffix == TStringBuf("summ") || suffix == TStringBuf("hgram")) { return true; - } else if (suffix == TStringBuf("max")) { + } else if (suffix == TStringBuf("max")) { return false; } diff --git a/library/cpp/monlib/encode/unistat/unistat_ut.cpp b/library/cpp/monlib/encode/unistat/unistat_ut.cpp index 7da071a587..dbbc238bf3 100644 --- a/library/cpp/monlib/encode/unistat/unistat_ut.cpp +++ b/library/cpp/monlib/encode/unistat/unistat_ut.cpp @@ -9,7 +9,7 @@ using namespace NMonitoring; Y_UNIT_TEST_SUITE(TUnistatDecoderTest) { Y_UNIT_TEST(ScalarMetric) { - constexpr auto input = TStringBuf(R"([["something_axxx", 42]])"); + constexpr auto input = TStringBuf(R"([["something_axxx", 42]])"); NProto::TMultiSamplesList samples; auto encoder = EncoderProtobuf(&samples); @@ -57,7 +57,7 @@ Y_UNIT_TEST_SUITE(TUnistatDecoderTest) { } Y_UNIT_TEST(ThrowsOnTopLevelObject) { - constexpr auto input = TStringBuf(R"({["something_axxx", 42]})"); + constexpr auto input = TStringBuf(R"({["something_axxx", 42]})"); NProto::TMultiSamplesList samples; auto encoder = EncoderProtobuf(&samples); @@ -66,7 +66,7 @@ Y_UNIT_TEST_SUITE(TUnistatDecoderTest) { } Y_UNIT_TEST(ThrowsOnUnwrappedMetric) { - constexpr auto input = TStringBuf(R"(["something_axxx", 42])"); + constexpr auto input = TStringBuf(R"(["something_axxx", 42])"); NProto::TMultiSamplesList samples; auto encoder = EncoderProtobuf(&samples); @@ -75,7 +75,7 @@ Y_UNIT_TEST_SUITE(TUnistatDecoderTest) { } Y_UNIT_TEST(HistogramMetric) { - constexpr auto input = TStringBuf(R"([["something_hgram", [[0, 1], [200, 2], [500, 3]] ]])"); + constexpr auto input = TStringBuf(R"([["something_hgram", [[0, 1], [200, 2], [500, 3]] ]])"); NProto::TMultiSamplesList samples; auto encoder = EncoderProtobuf(&samples); @@ -106,7 +106,7 @@ Y_UNIT_TEST_SUITE(TUnistatDecoderTest) { } Y_UNIT_TEST(AbsoluteHistogram) { - constexpr auto input = TStringBuf(R"([["something_ahhh", [[0, 1], [200, 2], [500, 3]] ]])"); + constexpr auto input = TStringBuf(R"([["something_ahhh", [[0, 1], [200, 2], [500, 3]] ]])"); NProto::TMultiSamplesList samples; auto encoder = EncoderProtobuf(&samples); @@ -134,23 +134,23 @@ Y_UNIT_TEST_SUITE(TUnistatDecoderTest) { auto encoder = EncoderProtobuf(&samples); { - constexpr auto input = TStringBuf(R"([["someth!ng_ahhh", [[0, 1], [200, 2], [500, 3]] ]])"); + constexpr auto input = TStringBuf(R"([["someth!ng_ahhh", [[0, 1], [200, 2], [500, 3]] ]])"); UNIT_ASSERT_EXCEPTION(DecodeUnistat(input, encoder.Get()), yexception); } { - constexpr auto input = TStringBuf(R"([["foo_a", [[0, 1], [200, 2], [500, 3]] ]])"); + constexpr auto input = TStringBuf(R"([["foo_a", [[0, 1], [200, 2], [500, 3]] ]])"); UNIT_ASSERT_EXCEPTION(DecodeUnistat(input, encoder.Get()), yexception); } { - constexpr auto input = TStringBuf(R"([["foo_ahhh;tag=value", [[0, 1], [200, 2], [500, 3]] ]])"); + constexpr auto input = TStringBuf(R"([["foo_ahhh;tag=value", [[0, 1], [200, 2], [500, 3]] ]])"); UNIT_ASSERT_EXCEPTION(DecodeUnistat(input, encoder.Get()), yexception); } } Y_UNIT_TEST(MultipleMetrics) { - constexpr auto input = TStringBuf(R"([["something_axxx", 42], ["some-other_dhhh", 53]])"); + constexpr auto input = TStringBuf(R"([["something_axxx", 42], ["some-other_dhhh", 53]])"); NProto::TMultiSamplesList samples; auto encoder = EncoderProtobuf(&samples); @@ -182,7 +182,7 @@ Y_UNIT_TEST_SUITE(TUnistatDecoderTest) { } Y_UNIT_TEST(UnderscoreName) { - constexpr auto input = TStringBuf(R"([["something_anything_dmmm", 42]])"); + constexpr auto input = TStringBuf(R"([["something_anything_dmmm", 42]])"); NProto::TMultiSamplesList samples; auto encoder = EncoderProtobuf(&samples); @@ -202,7 +202,7 @@ Y_UNIT_TEST_SUITE(TUnistatDecoderTest) { } Y_UNIT_TEST(MaxAggr) { - constexpr auto input = TStringBuf(R"([["something_anything_max", 42]])"); + constexpr auto input = TStringBuf(R"([["something_anything_max", 42]])"); NProto::TMultiSamplesList samples; auto encoder = EncoderProtobuf(&samples); |