Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentProcess ¶
GetCurrentProcess returns details about the current process
func NewNetStatistics ¶ added in v1.1.28
func NewNetStatistics() *netStatistics
NewNetStatistics returns a new instance of the netStatistics
Types ¶
type CpuStatistics ¶
type CpuStatistics struct {
// contains filtered or unexported fields
}
CpuStatistics can compute the cpu usage percent
func NewCpuStatistics ¶
func NewCpuStatistics() (*CpuStatistics, error)
NewCpuStatistics will create a CpuStatistics object
func (*CpuStatistics) ComputeStatistics ¶
func (cs *CpuStatistics) ComputeStatistics()
ComputeStatistics computes the current cpu usage. It should be called on a go routine as it is a blocking call for a bounded time (1 second)
func (*CpuStatistics) CpuPercentUsage ¶
func (cs *CpuStatistics) CpuPercentUsage() uint64
CpuPercentUsage will return the cpu percent usage. Concurrent safe.
type MemStatistics ¶
type MemStatistics struct { Total uint64 PercentUsed uint64 UsedByGolang uint64 UsedBySystem uint64 HeapInUse uint64 StackInUse uint64 }
MemStatistics holds memory statistics
func AcquireMemStatistics ¶ added in v1.0.136
func AcquireMemStatistics() MemStatistics
AcquireMemStatistics acquires memory statistics
func (*MemStatistics) String ¶ added in v1.0.136
func (stats *MemStatistics) String() string
Click to show internal directories.
Click to hide internal directories.