res_monitor

package
v1.3.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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 (r *Monitor) GetCPURatio() float64

func (*Monitor) GetCPURatioDelta

func (r *Monitor) GetCPURatioDelta() float64

GetCPURatioDelta compare with last window

func (*Monitor) GetGoRoutineNum

func (r *Monitor) GetGoRoutineNum() float64

func (*Monitor) GetGoRoutineNumDelta

func (r *Monitor) GetGoRoutineNumDelta() float64

GetGoRoutineNumDelta compare with last window

func (*Monitor) GetMemRatio

func (r *Monitor) GetMemRatio() float64

func (*Monitor) GetMemRatioDelta

func (r *Monitor) GetMemRatioDelta() float64

GetMemRatioDelta compare with last window

func (*Monitor) GetPastCPURatio

func (r *Monitor) GetPastCPURatio(sec int64) float64

GetPastCPURatio get past avg cpu_ratio in last n seconds

func (*Monitor) GetPastMemRatio

func (r *Monitor) GetPastMemRatio(sec int64) float64

GetPastMemRatio get past avg mem_ratio in last n seconds

func (*Monitor) Start

func (r *Monitor) Start()

func (*Monitor) Stop

func (r *Monitor) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL