diff options
author | d-korotin <d-korotin@yandex-team.ru> | 2022-02-10 16:49:44 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:44 +0300 |
commit | bd81267834e145340b7d7441308b87ccefcad980 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library | |
parent | 06dd6142880381ed6139a2a26614e085e3acc028 (diff) | |
download | ydb-bd81267834e145340b7d7441308b87ccefcad980.tar.gz |
Restoring authorship annotation for <d-korotin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library')
-rw-r--r-- | library/cpp/http/misc/httpreqdata.cpp | 2 | ||||
-rw-r--r-- | library/cpp/http/misc/httpreqdata.h | 8 | ||||
-rw-r--r-- | library/cpp/monlib/encode/unistat/unistat_decoder.cpp | 2 | ||||
-rw-r--r-- | library/cpp/monlib/encode/unistat/unistat_ut.cpp | 26 |
4 files changed, 19 insertions, 19 deletions
diff --git a/library/cpp/http/misc/httpreqdata.cpp b/library/cpp/http/misc/httpreqdata.cpp index 17d6b76cea..f6951f68cd 100644 --- a/library/cpp/http/misc/httpreqdata.cpp +++ b/library/cpp/http/misc/httpreqdata.cpp @@ -79,7 +79,7 @@ TString TBaseServerRequestData::HeaderByIndex(size_t n) const noexcept { return nullptr; } - THttpHeadersContainer::const_iterator i = HeadersIn_.begin(); + THttpHeadersContainer::const_iterator i = HeadersIn_.begin(); while (n) { ++i; diff --git a/library/cpp/http/misc/httpreqdata.h b/library/cpp/http/misc/httpreqdata.h index 0a47d1439f..16e59c4d78 100644 --- a/library/cpp/http/misc/httpreqdata.h +++ b/library/cpp/http/misc/httpreqdata.h @@ -15,8 +15,8 @@ #include <util/datetime/base.h> #include <util/generic/buffer.h> -using THttpHeadersContainer = THashMap<TString, TString, TCIOps, TCIOps>; - +using THttpHeadersContainer = THashMap<TString, TString, TCIOps, TCIOps>; + class TBaseServerRequestData { public: TBaseServerRequestData(SOCKET s = INVALID_SOCKET); @@ -60,7 +60,7 @@ public: void SetRemoteAddr(TStringBuf addr); const char* HeaderIn(TStringBuf key) const; - const THttpHeadersContainer& HeadersIn() const { + const THttpHeadersContainer& HeadersIn() const { return HeadersIn_; } @@ -95,7 +95,7 @@ private: char* Search; size_t SearchLength; // length of Search TStringBuf OrigSearch; - THttpHeadersContainer HeadersIn_; + THttpHeadersContainer HeadersIn_; mutable char AddrData[INET6_ADDRSTRLEN]; SOCKET Socket; ui64 BeginTime; diff --git a/library/cpp/monlib/encode/unistat/unistat_decoder.cpp b/library/cpp/monlib/encode/unistat/unistat_decoder.cpp index 4a7232416a..b2344b0905 100644 --- a/library/cpp/monlib/encode/unistat/unistat_decoder.cpp +++ b/library/cpp/monlib/encode/unistat/unistat_decoder.cpp @@ -15,7 +15,7 @@ using namespace NJson; -const re2::RE2 NAME_RE{R"((?:[a-zA-Z0-9\.\-/@_]+_)+(?:[ad][vehmntx]{3}|summ|hgram|max))"}; +const re2::RE2 NAME_RE{R"((?:[a-zA-Z0-9\.\-/@_]+_)+(?:[ad][vehmntx]{3}|summ|hgram|max))"}; namespace NMonitoring { namespace { diff --git a/library/cpp/monlib/encode/unistat/unistat_ut.cpp b/library/cpp/monlib/encode/unistat/unistat_ut.cpp index 599b35e0ea..dbbc238bf3 100644 --- a/library/cpp/monlib/encode/unistat/unistat_ut.cpp +++ b/library/cpp/monlib/encode/unistat/unistat_ut.cpp @@ -30,7 +30,7 @@ Y_UNIT_TEST_SUITE(TUnistatDecoderTest) { } Y_UNIT_TEST(OverriddenTags) { - constexpr auto input = TStringBuf(R"([["ctype=foo;prj=bar;custom_tag=qwe;something_axxx", 42]])"); + constexpr auto input = TStringBuf(R"([["ctype=foo;prj=bar;custom_tag=qwe;something_axxx", 42]])"); NProto::TMultiSamplesList samples; auto encoder = EncoderProtobuf(&samples); @@ -40,7 +40,7 @@ Y_UNIT_TEST_SUITE(TUnistatDecoderTest) { UNIT_ASSERT_VALUES_EQUAL(samples.SamplesSize(), 1); auto sample = samples.GetSamples(0); UNIT_ASSERT_VALUES_EQUAL(sample.PointsSize(), 1); - UNIT_ASSERT_VALUES_EQUAL(sample.LabelsSize(), 4); + UNIT_ASSERT_VALUES_EQUAL(sample.LabelsSize(), 4); const auto& labels = sample.GetLabels(); TLabels actual; @@ -48,7 +48,7 @@ Y_UNIT_TEST_SUITE(TUnistatDecoderTest) { actual.Add(l.GetName(), l.GetValue()); } - TLabels expected{{"ctype", "foo"}, {"prj", "bar"}, {"custom_tag", "qwe"}, {"sensor", "something_axxx"}}; + TLabels expected{{"ctype", "foo"}, {"prj", "bar"}, {"custom_tag", "qwe"}, {"sensor", "something_axxx"}}; UNIT_ASSERT_VALUES_EQUAL(actual.size(), expected.size()); for (auto&& l : actual) { @@ -119,16 +119,16 @@ Y_UNIT_TEST_SUITE(TUnistatDecoderTest) { UNIT_ASSERT_VALUES_EQUAL(sample.LabelsSize(), 1); } - Y_UNIT_TEST(AllowedMetricNames) { - NProto::TMultiSamplesList samples; - auto encoder = EncoderProtobuf(&samples); - - { - constexpr auto input = TStringBuf(R"([["a/A-b/c_D/__G_dmmm", [[0, 1], [200, 2], [500, 3]] ]])"); - UNIT_ASSERT_NO_EXCEPTION(DecodeUnistat(input, encoder.Get())); - } - } - + Y_UNIT_TEST(AllowedMetricNames) { + NProto::TMultiSamplesList samples; + auto encoder = EncoderProtobuf(&samples); + + { + constexpr auto input = TStringBuf(R"([["a/A-b/c_D/__G_dmmm", [[0, 1], [200, 2], [500, 3]] ]])"); + UNIT_ASSERT_NO_EXCEPTION(DecodeUnistat(input, encoder.Get())); + } + } + Y_UNIT_TEST(DisallowedMetricNames) { NProto::TMultiSamplesList samples; auto encoder = EncoderProtobuf(&samples); |