stat

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUSampler

type CPUSampler interface {
	GetCPUUsageFraction() float64
	Shutdown()
}

type CPUUsage

type CPUUsage struct {
	System time.Duration
	User   time.Duration
}

CPUUsage contains process CPU times.

func GetCPUUsage

func GetCPUUsage() (CPUUsage, error)

GetCPUUsage gathers current process times.

type SamplerImpl

type SamplerImpl struct {
	// contains filtered or unexported fields
}

func NewCPUSampler

func NewCPUSampler(lg logger.Logger, period time.Duration) *SamplerImpl

func (*SamplerImpl) GetCPUUsageFraction

func (s *SamplerImpl) GetCPUUsageFraction() (fraction float64)

func (*SamplerImpl) Shutdown

func (s *SamplerImpl) Shutdown()

Jump to

Keyboard shortcuts

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