stats

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const GB = float32(1000000000)

Variables

This section is empty.

Functions

func GetAverage

func GetAverage(array []float32) float32

Types

type AllStat

type AllStat struct {
	CPU  MultipleStat `json:"cpu"`
	RAM  SingleStat   `json:"ram"`
	Disk SingleStat   `json:"disk"`
}

func GetAllStats

func GetAllStats(cpu MultipleStat, ram SingleStat, disk SingleStat) AllStat

type MultipleStat

type MultipleStat struct {
	AverageUsagePercentage float32   `json:"averageUsagePercentage"`
	UsagePercentagePerCore []float32 `json:"usagePercentagePerCore"`
}

func BuildCPUMultipleStat

func BuildCPUMultipleStat(usagePercentagePerCore []float32) MultipleStat

func GetCPUStat

func GetCPUStat() MultipleStat

type SingleStat

type SingleStat struct {
	TotalGB         float32 `json:"totalGB"`
	UsedGB          float32 `json:"usedGB"`
	AvailableGB     float32 `json:"availableGB"`
	UsagePercentage float32 `json:"usagePercentage"`
}

func BuildDiskStat

func BuildDiskStat(diskUsage disk.DiskUsageStat) SingleStat

func BuildRamStat

func BuildRamStat(vm mem.VirtualMemoryStat) SingleStat

func GetDiskStat

func GetDiskStat() SingleStat

func GetRAMStat

func GetRAMStat() SingleStat

Jump to

Keyboard shortcuts

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