Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CGroupsSampler ¶
type CGroupsSampler struct {
// contains filtered or unexported fields
}
CGroupsSampler represents Linux cgroups sampler
func NewCGroupsSampler ¶
func NewCGroupsSampler(path string) (*CGroupsSampler, error)
NewCGroupsSampler creates a stats sampler from existing control group
func (*CGroupsSampler) Query ¶
func (s *CGroupsSampler) Query() (*ProcMetrics, error)
Query gets a process metrics from control cgroup
type PSUtilSampler ¶
type PSUtilSampler struct {
// contains filtered or unexported fields
}
PSUtilSampler represents ps util sampler
func NewPSUtilSampler ¶
func NewPSUtilSampler(proc Process) (*PSUtilSampler, error)
NewPSUtilSampler creates a new ps util sampler
func (*PSUtilSampler) Query ¶
func (s *PSUtilSampler) Query() (*ProcMetrics, error)
Query gets a process metrics
type ProcMetrics ¶
ProcMetrics represents stats sample from daemon
type Process ¶
type Process interface { // PID returns daemon process id PID() (int, error) // ProcNames returns the list of process names contributing to mem/cpu usage during overhead benchmark ProcNames() []string }
Process represents an interfaces of a daemon to be sampled
type Sampler ¶
type Sampler interface { // Query gets a process metrics (cpu and memory usage) or error Query() (*ProcMetrics, error) }
Sampler represents an interface of a sampler
Click to show internal directories.
Click to hide internal directories.