calculator

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlkioCalculator

type BlkioCalculator interface {
	GetReadPs() float64
	GetWritePs() float64
	GetTotalPs() float64
}

type BlkioCalculatorImpl

type BlkioCalculatorImpl struct {
	Old BlkioData
	New BlkioData
}

func (BlkioCalculatorImpl) GetReadPs

func (c BlkioCalculatorImpl) GetReadPs() float64

func (BlkioCalculatorImpl) GetTotalPs

func (c BlkioCalculatorImpl) GetTotalPs() float64

func (BlkioCalculatorImpl) GetWritePs

func (c BlkioCalculatorImpl) GetWritePs() float64

type BlkioData

type BlkioData struct {
	Time   time.Time
	Reads  uint64
	Writes uint64
	Totals uint64
}

type CPUCalculator

type CPUCalculator interface {
	PerCpuUsage() common.MapStr
	TotalUsage() float64
	UsageInKernelmode() float64
	UsageInUsermode() float64
}

type CPUCalculatorImpl

type CPUCalculatorImpl struct {
	Old CPUData
	New CPUData
}

func (CPUCalculatorImpl) PerCpuUsage

func (c CPUCalculatorImpl) PerCpuUsage() common.MapStr

func (CPUCalculatorImpl) TotalUsage

func (c CPUCalculatorImpl) TotalUsage() float64

func (CPUCalculatorImpl) UsageInKernelmode

func (c CPUCalculatorImpl) UsageInKernelmode() float64

func (CPUCalculatorImpl) UsageInUsermode

func (c CPUCalculatorImpl) UsageInUsermode() float64

type CPUData

type CPUData struct {
	PerCpuUsage       []uint64
	TotalUsage        uint64
	UsageInKernelmode uint64
	UsageInUsermode   uint64
}

type CalculatorFactory

type CalculatorFactory interface {
	NewBlkioCalculator(old BlkioData, new BlkioData) BlkioCalculator
	NewCPUCalculator(old CPUData, new CPUData) CPUCalculator
	NewNetworkCalculator(old NetworkData, new NetworkData) NetworkCalculator
}

type CalculatorFactoryImpl

type CalculatorFactoryImpl struct {
}

func (CalculatorFactoryImpl) NewBlkioCalculator

func (c CalculatorFactoryImpl) NewBlkioCalculator(old BlkioData, new BlkioData) BlkioCalculator

func (CalculatorFactoryImpl) NewCPUCalculator

func (c CalculatorFactoryImpl) NewCPUCalculator(old CPUData, new CPUData) CPUCalculator

func (CalculatorFactoryImpl) NewNetworkCalculator

func (c CalculatorFactoryImpl) NewNetworkCalculator(old NetworkData, new NetworkData) NetworkCalculator

type NetworkCalculator

type NetworkCalculator interface {
	GetRxBytesPerSecond() float64
	GetRxDroppedPerSecond() float64
	GetRxErrorsPerSecond() float64
	GetRxPacketsPerSecond() float64
	GetTxBytesPerSecond() float64
	GetTxDroppedPerSecond() float64
	GetTxErrorsPerSecond() float64
	GetTxPacketsPerSecond() float64
}

type NetworkCalculatorImpl

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

func (NetworkCalculatorImpl) GetRxBytesPerSecond

func (c NetworkCalculatorImpl) GetRxBytesPerSecond() float64

func (NetworkCalculatorImpl) GetRxDroppedPerSecond

func (c NetworkCalculatorImpl) GetRxDroppedPerSecond() float64

func (NetworkCalculatorImpl) GetRxErrorsPerSecond

func (c NetworkCalculatorImpl) GetRxErrorsPerSecond() float64

func (NetworkCalculatorImpl) GetRxPacketsPerSecond

func (c NetworkCalculatorImpl) GetRxPacketsPerSecond() float64

func (NetworkCalculatorImpl) GetTxBytesPerSecond

func (c NetworkCalculatorImpl) GetTxBytesPerSecond() float64

func (NetworkCalculatorImpl) GetTxDroppedPerSecond

func (c NetworkCalculatorImpl) GetTxDroppedPerSecond() float64

func (NetworkCalculatorImpl) GetTxErrorsPerSecond

func (c NetworkCalculatorImpl) GetTxErrorsPerSecond() float64

func (NetworkCalculatorImpl) GetTxPacketsPerSecond

func (c NetworkCalculatorImpl) GetTxPacketsPerSecond() float64

type NetworkData

type NetworkData struct {
	Time      time.Time
	RxBytes   uint64
	RxDropped uint64
	RxErrors  uint64
	RxPackets uint64
	TxBytes   uint64
	TxDropped uint64
	TxErrors  uint64
	TxPackets uint64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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