Documentation ¶
Index ¶
- func GetCPULimit() (cpuLimit float64)
- type CPUMonitor
- type GoRoutineMonitor
- type MemMonitor
- type Monitor
- func (r *Monitor) GetCPURatio() float64
- func (r *Monitor) GetCPURatioDelta() float64
- func (r *Monitor) GetGoRoutineNum() float64
- func (r *Monitor) GetGoRoutineNumDelta() float64
- func (r *Monitor) GetMemRatio() float64
- func (r *Monitor) GetMemRatioDelta() float64
- func (r *Monitor) GetPastCPURatio(sec int64) float64
- func (r *Monitor) GetPastMemRatio(sec int64) float64
- func (r *Monitor) Start()
- func (r *Monitor) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCPULimit ¶
func GetCPULimit() (cpuLimit float64)
GetCPULimit returns cpu cores that process can use
Types ¶
type CPUMonitor ¶
type CPUMonitor struct {
// contains filtered or unexported fields
}
func NewCPUMonitor ¶
func NewCPUMonitor() *CPUMonitor
func (*CPUMonitor) GetCPURatio ¶
func (m *CPUMonitor) GetCPURatio() float64
GetCPURatio gets the cpuRatio between current and last invoking. Be aware this method is not cached.
type GoRoutineMonitor ¶
type GoRoutineMonitor struct {
// contains filtered or unexported fields
}
func NewGoRoutineMonitor ¶
func NewGoRoutineMonitor() *GoRoutineMonitor
func (*GoRoutineMonitor) GetGoRoutineNum ¶
func (m *GoRoutineMonitor) GetGoRoutineNum() int64
GetGoRoutineNum gets the current goRoutine number. Be aware this method is not cached.
type MemMonitor ¶
type MemMonitor struct {
// contains filtered or unexported fields
}
func NewMemMonitor ¶
func NewMemMonitor() *MemMonitor
func (*MemMonitor) GetMemRatio ¶
func (m *MemMonitor) GetMemRatio() float64
GetMemRatio gets the current rssRatio. Be aware this method is not cached.
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
func NewMonitor ¶
func NewMonitor() *Monitor
func (*Monitor) GetCPURatio ¶
func (*Monitor) GetCPURatioDelta ¶
GetCPURatioDelta compare with last window
func (*Monitor) GetGoRoutineNum ¶
func (*Monitor) GetGoRoutineNumDelta ¶
GetGoRoutineNumDelta compare with last window
func (*Monitor) GetMemRatio ¶
func (*Monitor) GetMemRatioDelta ¶
GetMemRatioDelta compare with last window
func (*Monitor) GetPastCPURatio ¶
GetPastCPURatio get past avg cpu_ratio in last n seconds
func (*Monitor) GetPastMemRatio ¶
GetPastMemRatio get past avg mem_ratio in last n seconds
Click to show internal directories.
Click to hide internal directories.