telemetry

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvgCpuUsage

func AvgCpuUsage(init, final CpuUsage) (avg float64)

func BootstrapHandler

func BootstrapHandler(ctx context.Context, wg *sync.WaitGroup, startupTimer startup.Timer, dic *di.Container) bool

BootstrapHandler fulfills the BootstrapHandler contract. It creates a go routine to periodically sample CPU usage and is intended to supersede the existing StartCpuUsageAverage() function when the new bootstrap package is used by all of the core services.

Types

type CpuUsage

type CpuUsage struct {
	Busy,
	Idle,
	Total uint64 // reported sum total of all usage
}

func PollCpu

func PollCpu() (cpuSnapshot CpuUsage)

type SystemUsage

type SystemUsage struct {
	Memory     memoryUsage
	CpuBusyAvg float64
}

func NewSystemUsage

func NewSystemUsage() (s SystemUsage)

Jump to

Keyboard shortcuts

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