flow

package
v0.0.0-...-303e327 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IOStatFileSuffix = "iostat"
)

Variables

View Source
var ErrInvalidStatName = errors.New("flow: invalid stat name")

Functions

func GenerateStatName

func GenerateStatName(pid int, key string, value string, suffix string) string

${pid}.${key}_${value}.${suffix}

func NewDiskViewer

func NewDiskViewer(ioFlow *IOFlowStat) iostat.IOViewer

func ParseStatName

func ParseStatName(fname string) (pid int, suffix string, err error)

func SetupDefaultIOStat

func SetupDefaultIOStat(s *IOFlowStat)

Types

type DiskViewer

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

func (*DiskViewer) Close

func (d *DiskViewer) Close()

func (*DiskViewer) ReadStat

func (d *DiskViewer) ReadStat() *iostat.StatData

func (*DiskViewer) Update

func (d *DiskViewer) Update()

func (*DiskViewer) WriteStat

func (d *DiskViewer) WriteStat() *iostat.StatData

type IOFlowStat

type IOFlowStat [bnapi.IOTypeMax]*iostat.StatMgr

func NewIOFlowStat

func NewIOFlowStat(key string, dryRun bool) (*IOFlowStat, error)

func (*IOFlowStat) GetStatMgr

func (flow *IOFlowStat) GetStatMgr(iot bnapi.IOType) iostat.StatMgrAPI

type StatGetter

type StatGetter interface {
	GetStatMgr(ioType bnapi.IOType) iostat.StatMgrAPI
}

Jump to

Keyboard shortcuts

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