aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/service
diff options
context:
space:
mode:
authorivanzhukov <ivanzhukov@yandex-team.ru>2022-02-10 16:49:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:40 +0300
commit0892d79ab411592ad25175c4bdadbcb09b466cf5 (patch)
tree98dfdd45463c9bd747101748a9ca25d2917390fd /library/cpp/monlib/service
parent1b7466cb957659079ebebbb5d76e64e51f3306f0 (diff)
downloadydb-0892d79ab411592ad25175c4bdadbcb09b466cf5.tar.gz
Restoring authorship annotation for <ivanzhukov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/monlib/service')
-rw-r--r--library/cpp/monlib/service/monservice.cpp22
-rw-r--r--library/cpp/monlib/service/pages/registry_mon_page.cpp6
-rw-r--r--library/cpp/monlib/service/pages/registry_mon_page.h22
-rw-r--r--library/cpp/monlib/service/pages/templates.h2
-rw-r--r--library/cpp/monlib/service/service.cpp18
5 files changed, 35 insertions, 35 deletions
diff --git a/library/cpp/monlib/service/monservice.cpp b/library/cpp/monlib/service/monservice.cpp
index d1b9cda1d2..212f3a21c4 100644
--- a/library/cpp/monlib/service/monservice.cpp
+++ b/library/cpp/monlib/service/monservice.cpp
@@ -5,7 +5,7 @@
#include <library/cpp/svnversion/svnversion.h>
#include <util/generic/map.h>
-#include <util/generic/ptr.h>
+#include <util/generic/ptr.h>
#include <util/system/hostname.h>
#include <google/protobuf/text_format.h>
@@ -29,16 +29,16 @@ TMonService2::TMonService2(const THttpServerOptions& options, const TString& tit
}
TMonService2::TMonService2(const THttpServerOptions& options, TSimpleSharedPtr<IThreadPool> pool, const TString& title, THolder<IAuthProvider> auth)
- : NMonitoring::TMtHttpServer(options, std::bind(&TMonService2::ServeRequest, this, std::placeholders::_1, std::placeholders::_2), std::move(pool))
- , Title(title)
- , IndexMonPage(new TIndexMonPage("", Title))
+ : NMonitoring::TMtHttpServer(options, std::bind(&TMonService2::ServeRequest, this, std::placeholders::_1, std::placeholders::_2), std::move(pool))
+ , Title(title)
+ , IndexMonPage(new TIndexMonPage("", Title))
, AuthProvider_{std::move(auth)}
-{
- Y_VERIFY(!!title);
- time_t t = time(nullptr);
- ctime_r(&t, StartTime);
-}
-
+{
+ Y_VERIFY(!!title);
+ time_t t = time(nullptr);
+ ctime_r(&t, StartTime);
+}
+
TMonService2::TMonService2(ui16 port, ui32 threads, const TString& title, THolder<IAuthProvider> auth)
: TMonService2(port, TString(), threads, title, std::move(auth))
{
@@ -109,7 +109,7 @@ void TMonService2::Register(IMonPage* page) {
}
void TMonService2::Register(TMonPagePtr page) {
- IndexMonPage->Register(std::move(page));
+ IndexMonPage->Register(std::move(page));
}
TIndexMonPage* TMonService2::RegisterIndexPage(const TString& path, const TString& title) {
diff --git a/library/cpp/monlib/service/pages/registry_mon_page.cpp b/library/cpp/monlib/service/pages/registry_mon_page.cpp
index c59e50f622..f6c35b808d 100644
--- a/library/cpp/monlib/service/pages/registry_mon_page.cpp
+++ b/library/cpp/monlib/service/pages/registry_mon_page.cpp
@@ -30,9 +30,9 @@ namespace NMonitoring {
}
out.Write(resp);
- RegistryRawPtr_->Accept(TInstant::Zero(), encoder.Get());
-
- encoder->Close();
+ RegistryRawPtr_->Accept(TInstant::Zero(), encoder.Get());
+
+ encoder->Close();
} else {
THtmlMonPage::Output(request);
}
diff --git a/library/cpp/monlib/service/pages/registry_mon_page.h b/library/cpp/monlib/service/pages/registry_mon_page.h
index 2d26d3319c..b8caff9ad2 100644
--- a/library/cpp/monlib/service/pages/registry_mon_page.h
+++ b/library/cpp/monlib/service/pages/registry_mon_page.h
@@ -8,25 +8,25 @@ namespace NMonitoring {
// For now this class can only enumerate all metrics without any grouping or serve JSON/Spack/Prometheus
class TMetricRegistryPage: public TPreMonPage {
public:
- TMetricRegistryPage(const TString& path, const TString& title, TAtomicSharedPtr<IMetricSupplier> registry)
+ TMetricRegistryPage(const TString& path, const TString& title, TAtomicSharedPtr<IMetricSupplier> registry)
: TPreMonPage(path, title)
- , Registry_(registry)
- , RegistryRawPtr_(Registry_.Get())
- {
- }
-
- TMetricRegistryPage(const TString& path, const TString& title, IMetricSupplier* registry)
- : TPreMonPage(path, title)
- , RegistryRawPtr_(registry)
+ , Registry_(registry)
+ , RegistryRawPtr_(Registry_.Get())
{
}
+ TMetricRegistryPage(const TString& path, const TString& title, IMetricSupplier* registry)
+ : TPreMonPage(path, title)
+ , RegistryRawPtr_(registry)
+ {
+ }
+
void Output(NMonitoring::IMonHttpRequest& request) override;
void OutputText(IOutputStream& out, NMonitoring::IMonHttpRequest&) override;
private:
- TAtomicSharedPtr<IMetricSupplier> Registry_;
- IMetricSupplier* RegistryRawPtr_;
+ TAtomicSharedPtr<IMetricSupplier> Registry_;
+ IMetricSupplier* RegistryRawPtr_;
};
}
diff --git a/library/cpp/monlib/service/pages/templates.h b/library/cpp/monlib/service/pages/templates.h
index b4656f059f..cb1ec4d532 100644
--- a/library/cpp/monlib/service/pages/templates.h
+++ b/library/cpp/monlib/service/pages/templates.h
@@ -6,7 +6,7 @@
#define WITH_SCOPED(var, value) WITH_SCOPED_I(var, value, Y_GENERATE_UNIQUE_ID(WITH_SCOPED_LABEL_))
#define WITH_SCOPED_I(var, value, label) \
- if (auto var = (value)) { \
+ if (auto var = (value)) { \
Y_UNUSED(var); \
goto label; \
} else \
diff --git a/library/cpp/monlib/service/service.cpp b/library/cpp/monlib/service/service.cpp
index 929efbf816..633b8403aa 100644
--- a/library/cpp/monlib/service/service.cpp
+++ b/library/cpp/monlib/service/service.cpp
@@ -136,7 +136,7 @@ namespace NMonitoring {
TCoHttpServer::TCoHttpServer(TContExecutor& executor, const TString& bindAddr, TIpPort port, THandler handler)
: Executor(executor)
, Listener(this, &executor)
- , Handler(std::move(handler))
+ , Handler(std::move(handler))
, BindAddr(bindAddr)
, Port(port)
{
@@ -205,16 +205,16 @@ namespace NMonitoring {
TMtHttpServer::TMtHttpServer(const TOptions& options, THandler handler, IThreadFactory* pool)
: THttpServer(this, options, pool)
- , Handler(std::move(handler))
+ , Handler(std::move(handler))
{
}
TMtHttpServer::TMtHttpServer(const TOptions& options, THandler handler, TSimpleSharedPtr<IThreadPool> pool)
- : THttpServer(this, /* mainWorkers = */pool, /* failWorkers = */pool, options)
- , Handler(std::move(handler))
- {
- }
-
+ : THttpServer(this, /* mainWorkers = */pool, /* failWorkers = */pool, options)
+ , Handler(std::move(handler))
+ {
+ }
+
bool TMtHttpServer::Start() {
return THttpServer::Start();
}
@@ -241,9 +241,9 @@ namespace NMonitoring {
TMonService::TMonService(TContExecutor& executor, TIpPort internalPort, TIpPort externalPort,
THandler coHandler, THandler mtHandler)
- : CoServer(executor, "127.0.0.1", internalPort, std::move(coHandler))
+ : CoServer(executor, "127.0.0.1", internalPort, std::move(coHandler))
, MtServer(THttpServerOptions(externalPort), std::bind(&TMonService::DispatchRequest, this, std::placeholders::_1, std::placeholders::_2))
- , MtHandler(std::move(mtHandler))
+ , MtHandler(std::move(mtHandler))
{
}