userver: userver/server/handlers/jemalloc.hpp Source File
Loading...
Searching...
No Matches
jemalloc.hpp
Go to the documentation of this file.
1#pragma once
2
5
8
9USERVER_NAMESPACE_BEGIN
10
11namespace server::handlers {
12
51class Jemalloc final : public HttpHandlerBase {
52public:
53 enum class Command {
54 kStat,
55 kEnable,
56 kDisable,
57 kDump,
58 kBgThreadsSetMax,
59 kBgThreadsEnable,
60 kBgThreadsDisable,
61 kHeap,
62 kCmdline,
63 kSymbol,
64 };
65 static std::optional<Command> GetCommandFromString(std::string_view str);
66 static std::string ListCommands();
67
69
72 static constexpr std::string_view kName = "handler-jemalloc";
73
74 std::string HandleRequestThrow(const http::HttpRequest&, request::RequestContext&) const override;
75
77
78private:
79 engine::TaskProcessor& fs_task_processor_;
80};
81
82} // namespace server::handlers
83
84template <>
86
87USERVER_NAMESPACE_END