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 | 7fe839092527589b38f014d854c51565b3c1adfa (patch) | |
tree | 309e97022d3530044b712b8f71318c78faf7856e /library/cpp/monlib/service | |
parent | d0d68c395c10da4cb56a1c845504570a04d7893e (diff) | |
download | ydb-7fe839092527589b38f014d854c51565b3c1adfa.tar.gz |
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/monlib/service')
-rw-r--r-- | library/cpp/monlib/service/format.h | 16 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/index_mon_page.cpp | 2 | ||||
-rw-r--r-- | library/cpp/monlib/service/pages/registry_mon_page.cpp | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/monlib/service/format.h b/library/cpp/monlib/service/format.h index 0044b586b1..5eb3261966 100644 --- a/library/cpp/monlib/service/format.h +++ b/library/cpp/monlib/service/format.h @@ -21,9 +21,9 @@ namespace NMonitoring { auto it = FindIf(std::begin(headers), std::end(headers), [=] (const auto& h) { if constexpr (NPrivate::THasName<std::decay_t<decltype(h)>>::value) { - return AsciiCompareIgnoreCase(h.Name(), TStringBuf("accept-encoding")) == 0; + return AsciiCompareIgnoreCase(h.Name(), TStringBuf("accept-encoding")) == 0; } else if (isPlainPair) { - return AsciiCompareIgnoreCase(h.first, TStringBuf("accept-encoding")) == 0; + return AsciiCompareIgnoreCase(h.first, TStringBuf("accept-encoding")) == 0; } }); @@ -46,14 +46,14 @@ namespace NMonitoring { template <typename TRequest> NMonitoring::EFormat ParseFormat(const TRequest& req) { auto&& formatStr = req.GetParams() - .Get(TStringBuf("format")); + .Get(TStringBuf("format")); if (!formatStr.empty()) { - if (formatStr == TStringBuf("SPACK")) { + if (formatStr == TStringBuf("SPACK")) { return EFormat::SPACK; - } else if (formatStr == TStringBuf("TEXT")) { + } else if (formatStr == TStringBuf("TEXT")) { return EFormat::TEXT; - } else if (formatStr == TStringBuf("JSON")) { + } else if (formatStr == TStringBuf("JSON")) { return EFormat::JSON; } else { ythrow yexception() << "unknown format: " << formatStr << ". Only spack is supported here"; @@ -66,9 +66,9 @@ namespace NMonitoring { auto it = FindIf(std::begin(headers), std::end(headers), [=] (const auto& h) { if constexpr (NPrivate::THasName<std::decay_t<decltype(h)>>::value) { - return AsciiCompareIgnoreCase(h.Name(), TStringBuf("accept")) == 0; + return AsciiCompareIgnoreCase(h.Name(), TStringBuf("accept")) == 0; } else if (isPlainPair) { - return AsciiCompareIgnoreCase(h.first, TStringBuf("accept")) == 0; + return AsciiCompareIgnoreCase(h.first, TStringBuf("accept")) == 0; } }); diff --git a/library/cpp/monlib/service/pages/index_mon_page.cpp b/library/cpp/monlib/service/pages/index_mon_page.cpp index 83ff8b529a..3e2db86b9e 100644 --- a/library/cpp/monlib/service/pages/index_mon_page.cpp +++ b/library/cpp/monlib/service/pages/index_mon_page.cpp @@ -15,7 +15,7 @@ void TIndexMonPage::OutputIndexPage(IMonHttpRequest& request) { void TIndexMonPage::Output(IMonHttpRequest& request) { TStringBuf pathInfo = request.GetPathInfo(); - if (pathInfo.empty() || pathInfo == TStringBuf("/")) { + if (pathInfo.empty() || pathInfo == TStringBuf("/")) { OutputIndexPage(request); return; } diff --git a/library/cpp/monlib/service/pages/registry_mon_page.cpp b/library/cpp/monlib/service/pages/registry_mon_page.cpp index c59e50f622..ecdba2e827 100644 --- a/library/cpp/monlib/service/pages/registry_mon_page.cpp +++ b/library/cpp/monlib/service/pages/registry_mon_page.cpp @@ -15,10 +15,10 @@ namespace NMonitoring { IMetricEncoderPtr encoder; TString resp; - if (formatStr == TStringBuf("json")) { + if (formatStr == TStringBuf("json")) { resp = HTTPOKJSON; encoder = NMonitoring::EncoderJson(&out); - } else if (formatStr == TStringBuf("spack")) { + } else if (formatStr == TStringBuf("spack")) { resp = HTTPOKSPACK; const auto compression = ParseCompression(request); encoder = NMonitoring::EncoderSpackV1(&out, ETimePrecision::SECONDS, compression); |