userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
jemalloc.hpp
Go to the documentation of this file.
1
#pragma once
2
5
6
#include <
userver/engine/task/task_processor_fwd.hpp
>
7
#include <
userver/server/handlers/http_handler_base.hpp
>
8
9
USERVER_NAMESPACE_BEGIN
10
11
namespace
server::handlers
{
12
51
class
Jemalloc final :
public
HttpHandlerBase {
52
public
:
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
68
Jemalloc(
const
components::ComponentConfig
&,
const
components::ComponentContext
&);
69
72
static
constexpr
std::string_view
kName
=
"handler-jemalloc"
;
73
74
std::string
HandleRequestThrow
(
const
http::HttpRequest
&,
request::RequestContext
&)
const override
;
75
76
static
yaml_config::Schema
GetStaticConfigSchema
();
77
78
private
:
79
engine::TaskProcessor& fs_task_processor_;
80
};
81
82
}
// namespace server::handlers
83
84
template
<>
85
inline
constexpr
bool
components::kHasValidate<server::handlers::Jemalloc>
=
true
;
86
87
USERVER_NAMESPACE_END
userver
server
handlers
jemalloc.hpp
Generated on
for userver by
Doxygen
1.17.0