aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-11-17 01:13:50 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-11-17 01:22:08 +0300
commit4b61178f9dabd9b41ceccc021ee0aab9e0e54c3e (patch)
treec6edb4419c78d173739b754d256691451f75d6b2
parentde44d83afa148a543521001a18741f298fe657d4 (diff)
downloadydb-4b61178f9dabd9b41ceccc021ee0aab9e0e54c3e.tar.gz
Intermediate changes
commit_hash:703034384289d4413f5761736c0a0204198ea13b
-rw-r--r--yt/yt/library/ytprof/http/handler.cpp34
1 files changed, 20 insertions, 14 deletions
diff --git a/yt/yt/library/ytprof/http/handler.cpp b/yt/yt/library/ytprof/http/handler.cpp
index 2dbc631957..7ad74d3171 100644
--- a/yt/yt/library/ytprof/http/handler.cpp
+++ b/yt/yt/library/ytprof/http/handler.cpp
@@ -180,7 +180,7 @@ public:
}
private:
- tcmalloc::ProfileType ProfileType_;
+ const tcmalloc::ProfileType ProfileType_;
};
class TTCMallocAllocationProfilerHandler
@@ -206,7 +206,7 @@ class TTCMallocStatHandler
: public IHttpHandler
{
public:
- void HandleRequest(const IRequestPtr& /* req */, const IResponseWriterPtr& rsp) override
+ void HandleRequest(const IRequestPtr& /*req*/, const IResponseWriterPtr& rsp) override
{
auto stat = tcmalloc::MallocExtension::GetStats();
rsp->SetStatus(EStatusCode::OK);
@@ -258,7 +258,7 @@ class TVersionHandler
: public IHttpHandler
{
public:
- void HandleRequest(const IRequestPtr& /* req */, const IResponseWriterPtr& rsp) override
+ void HandleRequest(const IRequestPtr& /*req*/, const IResponseWriterPtr& rsp) override
{
rsp->SetStatus(EStatusCode::OK);
WaitFor(rsp->WriteBody(TSharedRef::FromString(GetVersion())))
@@ -270,7 +270,7 @@ class TBuildIdHandler
: public IHttpHandler
{
public:
- void HandleRequest(const IRequestPtr& /* req */, const IResponseWriterPtr& rsp) override
+ void HandleRequest(const IRequestPtr& /*req*/, const IResponseWriterPtr& rsp) override
{
rsp->SetStatus(EStatusCode::OK);
WaitFor(rsp->WriteBody(TSharedRef::FromString(GetVersion())))
@@ -291,22 +291,28 @@ void Register(
const TString& prefix,
const TBuildInfo& buildInfo)
{
- handlers->Add(prefix + "/profile", New<TCpuProfilerHandler>(buildInfo));
+ handlers->Add(prefix + "/cpu/profile", New<TCpuProfilerHandler>(buildInfo));
- handlers->Add(prefix + "/lock", New<TSpinlockProfilerHandler>(buildInfo, false));
- handlers->Add(prefix + "/block", New<TSpinlockProfilerHandler>(buildInfo, true));
+ handlers->Add(prefix + "/spinlock/lock", New<TSpinlockProfilerHandler>(buildInfo, false));
+ handlers->Add(prefix + "/spinlock/block", New<TSpinlockProfilerHandler>(buildInfo, true));
- handlers->Add(prefix + "/heap", New<TTCMallocSnapshotProfilerHandler>(buildInfo, tcmalloc::ProfileType::kHeap));
- handlers->Add(prefix + "/peak", New<TTCMallocSnapshotProfilerHandler>(buildInfo, tcmalloc::ProfileType::kPeakHeap));
- handlers->Add(prefix + "/fragmentation", New<TTCMallocSnapshotProfilerHandler>(buildInfo, tcmalloc::ProfileType::kFragmentation));
- handlers->Add(prefix + "/allocations", New<TTCMallocAllocationProfilerHandler>(buildInfo));
-
- handlers->Add(prefix + "/tcmalloc", New<TTCMallocStatHandler>());
+ handlers->Add(prefix + "/tcmalloc/current", New<TTCMallocSnapshotProfilerHandler>(buildInfo, tcmalloc::ProfileType::kHeap));
+ handlers->Add(prefix + "/tcmalloc/peak", New<TTCMallocSnapshotProfilerHandler>(buildInfo, tcmalloc::ProfileType::kPeakHeap));
+ handlers->Add(prefix + "/tcmalloc/fragmentation", New<TTCMallocSnapshotProfilerHandler>(buildInfo, tcmalloc::ProfileType::kFragmentation));
+ handlers->Add(prefix + "/tcmalloc/allocation", New<TTCMallocAllocationProfilerHandler>(buildInfo));
+ handlers->Add(prefix + "/tcmalloc/stat", New<TTCMallocStatHandler>());
handlers->Add(prefix + "/binary", New<TBinaryHandler>());
-
+ handlers->Add(prefix + "/build_id", New<TBuildIdHandler>());
handlers->Add(prefix + "/version", New<TVersionHandler>());
+
+ // COMPAT(babenko): consider dropping these
+ handlers->Add(prefix + "/profile", New<TCpuProfilerHandler>(buildInfo));
handlers->Add(prefix + "/buildid", New<TBuildIdHandler>());
+ handlers->Add(prefix + "/heap", New<TTCMallocSnapshotProfilerHandler>(buildInfo, tcmalloc::ProfileType::kHeap));
+ handlers->Add(prefix + "/peak", New<TTCMallocSnapshotProfilerHandler>(buildInfo, tcmalloc::ProfileType::kPeakHeap));
+ handlers->Add(prefix + "/fragmentation", New<TTCMallocSnapshotProfilerHandler>(buildInfo, tcmalloc::ProfileType::kFragmentation));
+ handlers->Add(prefix + "/allocations", New<TTCMallocAllocationProfilerHandler>(buildInfo));
}
////////////////////////////////////////////////////////////////////////////////