13 #ifndef __PROCESS_PROFILER_HPP__
14 #define __PROCESS_PROFILER_HPP__
29 authenticationRealm(_authenticationRealm) {}
36 if (authenticationRealm.
isSome()) {
38 authenticationRealm.
get(),
43 authenticationRealm.
get(),
50 return Profiler::start(request,
None());
56 return Profiler::stop(request,
None());
62 static const std::string START_HELP();
63 static const std::string STOP_HELP();
86 #endif // __PROCESS_PROCESS_HPP__
virtual void initialize()
Invoked when a process gets spawned.
Definition: profiler.hpp:34
Profiler(const Option< std::string > &_authenticationRealm)
Definition: profiler.hpp:27
Future< Response > request(const Request &request, bool streamedResponse=false)
Asynchronously sends an HTTP request to the process and returns the HTTP response once the entire res...
Definition: profiler.hpp:24
Definition: process.hpp:72
void route(const std::string &name, const Option< std::string > &help, const HttpRequestHandler &handler, const RouteOptions &options=RouteOptions())
Sets up a handler for HTTP requests with the specified name.
bool isSome() const
Definition: option.hpp:115
const T & get() const &
Definition: option.hpp:118
Result< Process > process(pid_t pid)
Definition: freebsd.hpp:30
virtual ~Profiler()
Definition: profiler.hpp:31
Definition: process.hpp:493