Help us shape the future of Go! Take the 2026 Go Developer Survey

util

package
v1.6.112 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DockerMeasuredCPUStats = []string{"Throttled Periods", "Throttled Time", "Percent"}

	// cgroup-v2 only exposes a subset of memory stats
	DockerCgroupV1MeasuredMemStats = []string{"RSS", "Cache", "Swap", "Usage", "Max Usage"}
	DockerCgroupV2MeasuredMemStats = []string{"Cache", "Swap", "Usage"}
)

Functions

func CalculateCPUPercent

func CalculateCPUPercent(newSample, oldSample, newTotal, oldTotal uint64, cores int) float64

func DockerStatsToTaskResourceUsage

func DockerStatsToTaskResourceUsage(s *docker.Stats) *cstructs.TaskResourceUsage

Types

This section is empty.

Jump to

Keyboard shortcuts

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