cpu

package
v0.0.0-...-be347a3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(base mb.BaseMetricSet) (mb.MetricSet, error)

New creates a new instance of the docker cpu MetricSet.

Types

type CPUService

type CPUService struct {
	Cores bool
}

CPUService is a helper to collect docker CPU metrics

func NewCpuService

func NewCpuService() *CPUService

type CPUStats

type CPUStats struct {
	Time                                  common.Time
	Container                             *docker.Container
	PerCPUUsage                           common.MapStr
	TotalUsage                            float64
	TotalUsageNormalized                  float64
	UsageInKernelmode                     uint64
	UsageInKernelmodePercentage           float64
	UsageInKernelmodePercentageNormalized float64
	UsageInUsermode                       uint64
	UsageInUsermodePercentage             float64
	UsageInUsermodePercentageNormalized   float64
	SystemUsage                           uint64
	SystemUsagePercentage                 float64
	SystemUsagePercentageNormalized       float64
}

type MetricSet

type MetricSet struct {
	mb.BaseMetricSet
	// contains filtered or unexported fields
}

func (*MetricSet) Close

func (m *MetricSet) Close() error

Close stops the metricset

func (*MetricSet) Fetch

func (m *MetricSet) Fetch(r mb.ReporterV2) error

Fetch returns a list of docker CPU stats.

Jump to

Keyboard shortcuts

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