aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/service
diff options
context:
space:
mode:
authortobo <tobo@yandex-team.ru>2022-02-10 16:47:27 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:27 +0300
commit55a7f90e4cd31e9481cace8ee5dfd682c27e810e (patch)
tree9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/monlib/service
parent7fe839092527589b38f014d854c51565b3c1adfa (diff)
downloadydb-55a7f90e4cd31e9481cace8ee5dfd682c27e810e.tar.gz
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/service')
-rw-r--r--library/cpp/monlib/service/format.h16
-rw-r--r--library/cpp/monlib/service/pages/index_mon_page.cpp2
-rw-r--r--library/cpp/monlib/service/pages/registry_mon_page.cpp4
3 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/monlib/service/format.h b/library/cpp/monlib/service/format.h
index 5eb3261966..0044b586b1 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 3e2db86b9e..83ff8b529a 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 ecdba2e827..c59e50f622 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);