17 #ifndef __CGROUPS_ISOLATOR_SUBSYSTEMS_PERF_EVENT_HPP__
18 #define __CGROUPS_ISOLATOR_SUBSYSTEMS_PERF_EVENT_HPP__
53 virtual std::string
name()
const
59 const ContainerID& containerId,
60 const std::string&
cgroup);
63 const ContainerID& containerId,
64 const std::string&
cgroup);
67 const ContainerID& containerId,
68 const std::string&
cgroup);
71 const ContainerID& containerId,
72 const std::string&
cgroup);
80 const std::string& hierarchy,
81 const std::set<std::string>& events);
85 Info(
const std::string& _cgroup)
107 std::set<std::string> events;
117 #endif // __CGROUPS_ISOLATOR_SUBSYSTEMS_PERF_EVENT_HPP__
const std::string CGROUP_SUBSYSTEM_PERF_EVENT_NAME
Definition: constants.hpp:51
static Try< process::Owned< Subsystem > > create(const Flags &flags, const std::string &hierarchy)
virtual std::string name() const
The cgroups subsystem name of this Subsystem object.
Definition: perf_event.hpp:53
virtual process::Future< Nothing > prepare(const ContainerID &containerId, const std::string &cgroup)
Prepare the cgroups subsystem for the associated container.
Result< hashmap< std::string, uint64_t > > statistics(const std::string &link)
const Flags flags
Flags used to launch the agent.
Definition: subsystem.hpp:176
virtual void initialize()
Invoked when a process gets spawned.
virtual ~PerfEventSubsystem()
Definition: perf_event.hpp:51
Definition: hashmap.hpp:38
virtual process::Future< ResourceStatistics > usage(const ContainerID &containerId, const std::string &cgroup)
Gather resource usage statistics of the cgroups subsystem for the associated container.
Definition: duration.hpp:259
Result< std::string > cgroup(pid_t pid)
Represent cgroups perf_event subsystem.
Definition: perf_event.hpp:44
An abstraction for cgroups subsystem.
Definition: subsystem.hpp:42
static Time now()
The current clock time for either the current process that makes this call or the global clock time i...
virtual process::Future< Nothing > recover(const ContainerID &containerId, const std::string &cgroup)
Recover the cgroups subsystem for the associated container.
virtual process::Future< Nothing > cleanup(const ContainerID &containerId, const std::string &cgroup)
Clean up the cgroups subsystem for the associated container.
const std::string hierarchy
The hierarchy path of cgroups subsystem.
Definition: subsystem.hpp:181