metrics

package
v0.3.11-0...-4fdaadb Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeStats

type NodeStats struct {
	Timestamps []int64
	RxBytes    []uint64
	TxBytes    []uint64
	CPU        []uint64
	Memory     []uint64
}

NodeStats contains the array of data that represents a timeline of the resource usage of a node.

func NewNodeStats

func NewNodeStats(reader io.Reader, start, end time.Time) NodeStats

NewNodeStats creates statistics for a node by reading the reader line by line.

func (NodeStats) Average

func (ns NodeStats) Average() (float64, float64, float64, float64)

Average returns the average for each column.

func (NodeStats) Max

func (ns NodeStats) Max() (uint64, uint64, uint64, uint64)

Max returns the maximum value for each column.

func (NodeStats) StdDev

func (ns NodeStats) StdDev() (float64, float64, float64, float64)

StdDev returns the standard deviation for each column.

type Stats

type Stats struct {
	Timestamp int64
	Tags      map[int64]string
	Nodes     map[string]NodeStats
}

Stats represents the JSON structure of the statistics written for each node.

func NewStats

func NewStats() Stats

NewStats returns a new instance of a statistics object.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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