perf

package
v0.13.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const CPUID = resource.ID("latest")

CPUID is a resource ID of singleton instance.

View Source
const CPUType = resource.Type("CPUStats.perf.talos.dev")

CPUType is type of Etcd resource.

View Source
const MemoryID = resource.ID("latest")

MemoryID is a resource ID of singleton instance.

View Source
const MemoryType = resource.Type("MemoryStats.perf.talos.dev")

MemoryType is type of Etcd resource.

View Source
const NamespaceName resource.Namespace = "perf"

NamespaceName contains resources related to stats.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPU

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

CPU represents the last CPU stats snapshot.

func NewCPU

func NewCPU() *CPU

NewCPU creates new default CPU stats object.

func (*CPU) DeepCopy

func (r *CPU) DeepCopy() resource.Resource

DeepCopy implements resource.Resource.

func (*CPU) Metadata

func (r *CPU) Metadata() *resource.Metadata

Metadata implements resource.Resource.

func (*CPU) ResourceDefinition

func (r *CPU) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements meta.ResourceDefinitionProvider interface.

func (*CPU) Spec

func (r *CPU) Spec() interface{}

Spec implements resource.Resource.

func (*CPU) String

func (r *CPU) String() string

func (*CPU) Update

func (r *CPU) Update(stat *procfs.Stat)

Update current CPU snapshot.

type CPUSpec

type CPUSpec struct {
	CPU             []CPUStat `yaml:"cpu"`
	CPUTotal        CPUStat   `yaml:"cpuTotal"`
	IRQTotal        uint64    `yaml:"irqTotal"`
	ContextSwitches uint64    `yaml:"contextSwitches"`
	ProcessCreated  uint64    `yaml:"processCreated"`
	ProcessRunning  uint64    `yaml:"processRunning"`
	ProcessBlocked  uint64    `yaml:"processBlocked"`
	SoftIrqTotal    uint64    `yaml:"softIrqTotal"`
}

CPUSpec represents the last CPU stats snapshot.

type CPUStat

type CPUStat struct {
	User      float64 `yaml:"user"`
	Nice      float64 `yaml:"nice"`
	System    float64 `yaml:"system"`
	Idle      float64 `yaml:"idle"`
	Iowait    float64 `yaml:"iowait"`
	Irq       float64 `yaml:"irq"`
	SoftIrq   float64 `yaml:"softIrq"`
	Steal     float64 `yaml:"steal"`
	Guest     float64 `yaml:"guest"`
	GuestNice float64 `yaml:"guestNice"`
}

CPUStat represents a single cpu stat.

type Memory

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

Memory represents the last Memory stats snapshot.

func NewMemory

func NewMemory() *Memory

NewMemory creates new default Memory stats object.

func (*Memory) DeepCopy

func (r *Memory) DeepCopy() resource.Resource

DeepCopy implements resource.Resource.

func (*Memory) Metadata

func (r *Memory) Metadata() *resource.Metadata

Metadata implements resource.Resource.

func (*Memory) ResourceDefinition

func (r *Memory) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements meta.ResourceDefinitionProvider interface.

func (*Memory) Spec

func (r *Memory) Spec() interface{}

Spec implements resource.Resource.

func (*Memory) String

func (r *Memory) String() string

func (*Memory) Update

func (r *Memory) Update(info *procfs.Meminfo)

Update current Mem snapshot.

type MemorySpec

type MemorySpec struct {
	MemTotal          uint64 `yaml:"total"`
	MemUsed           uint64 `yaml:"used"`
	MemAvailable      uint64 `yaml:"available"`
	Buffers           uint64 `yaml:"buffers"`
	Cached            uint64 `yaml:"cached"`
	SwapCached        uint64 `yaml:"swapCached"`
	Active            uint64 `yaml:"active"`
	Inactive          uint64 `yaml:"inactive"`
	ActiveAnon        uint64 `yaml:"activeAnon"`
	InactiveAnon      uint64 `yaml:"inactiveAnon"`
	ActiveFile        uint64 `yaml:"activeFile"`
	InactiveFile      uint64 `yaml:"inactiveFile"`
	Unevictable       uint64 `yaml:"unevictable"`
	Mlocked           uint64 `yaml:"mlocked"`
	SwapTotal         uint64 `yaml:"swapTotal"`
	SwapFree          uint64 `yaml:"swapFree"`
	Dirty             uint64 `yaml:"dirty"`
	Writeback         uint64 `yaml:"writeback"`
	AnonPages         uint64 `yaml:"anonPages"`
	Mapped            uint64 `yaml:"mapped"`
	Shmem             uint64 `yaml:"shmem"`
	Slab              uint64 `yaml:"slab"`
	SReclaimable      uint64 `yaml:"sreclaimable"`
	SUnreclaim        uint64 `yaml:"sunreclaim"`
	KernelStack       uint64 `yaml:"kernelStack"`
	PageTables        uint64 `yaml:"pageTables"`
	NFSunstable       uint64 `yaml:"nfsunstable"`
	Bounce            uint64 `yaml:"bounce"`
	WritebackTmp      uint64 `yaml:"writeBacktmp"`
	CommitLimit       uint64 `yaml:"commitLimit"`
	CommittedAS       uint64 `yaml:"commitTedas"`
	VmallocTotal      uint64 `yaml:"vmallocTotal"`
	VmallocUsed       uint64 `yaml:"vmallocUsed"`
	VmallocChunk      uint64 `yaml:"vmallocChunk"`
	HardwareCorrupted uint64 `yaml:"hardwareCorrupted"`
	AnonHugePages     uint64 `yaml:"anonHugePages"`
	ShmemHugePages    uint64 `yaml:"shmemHugePages"`
	ShmemPmdMapped    uint64 `yaml:"shmemPmdMapped"`
	CmaTotal          uint64 `yaml:"cmaTotal"`
	CmaFree           uint64 `yaml:"cmaFree"`
	HugePagesTotal    uint64 `yaml:"hugePagesTotal"`
	HugePagesFree     uint64 `yaml:"hugePagesFree"`
	HugePagesRsvd     uint64 `yaml:"hugePagesRsvd"`
	HugePagesSurp     uint64 `yaml:"hugePagesSurp"`
	Hugepagesize      uint64 `yaml:"hugepagesize"`
	DirectMap4k       uint64 `yaml:"directMap4k"`
	DirectMap2m       uint64 `yaml:"directMap2m"`
	DirectMap1g       uint64 `yaml:"directMap1g"`
}

MemorySpec represents the last Memory stats snapshot.

Jump to

Keyboard shortcuts

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