Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AvgCpuUsage ¶
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 }
type SystemUsage ¶
type SystemUsage struct { Memory memoryUsage CpuBusyAvg float64 }
func NewSystemUsage ¶
func NewSystemUsage() (s SystemUsage)
Click to show internal directories.
Click to hide internal directories.