measures

package
v0.0.0-...-8fd811e Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Measure

type Measure struct {
	UID                string          `json:"uid"` // unique id for idempotency
	ClientID           string          `json:"client_id"`
	Timestamp          time.Time       `json:"timestamp"`
	CPUUsagePercent    float64         `json:"cpu_usage_percent"`
	MemoryUsagePercent float64         `json:"memory_usage_percent"`
	IoUsagePercent     float64         `json:"io_usage_percent"`
	NetLan             models.NetBytes `json:"netlan"`
	NetWan             models.NetBytes `json:"netwan"`

	Processes   []Process    `json:"processes"`
	MountPoints []MountPoint `json:"mountpoints"`
}

func (*Measure) Clone

func (m *Measure) Clone() (clonedMeasure Measure)

type Measures

type Measures []*Measure

func (Measures) Clone

func (ms Measures) Clone() (clonedMeasures Measures)

type MountPoint

type MountPoint struct {
	Name        string  `json:"name"`
	FreeBytes   uint64  `json:"free_b"`
	TotalBytes  uint64  `json:"total_b"`
	FreePercent float64 `json:"free_percent"`
	UsedPercent float64 `json:"used_percent"`
}

func (MountPoint) CalcFreePercent

func (mp MountPoint) CalcFreePercent() (p float64)

func (MountPoint) CalcUsedPercent

func (mp MountPoint) CalcUsedPercent() (p float64)

func (*MountPoint) Clone

func (mp *MountPoint) Clone() (clonedMP MountPoint)

type NetBytes

type NetBytes struct {
	In  int `json:"in"`
	Out int `json:"out"`
}

type Process

type Process struct {
	Name    string `json:"name"`
	CmdLine string `json:"cmdline"`
}

func (*Process) Clone

func (p *Process) Clone() (clonedProcess Process)

Jump to

Keyboard shortcuts

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