metrics

package
v2.0.0-alpha.23 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Nano     TimeScale = "ns"
	Micro    TimeScale = "μs"
	Milli    TimeScale = "ms"
	Byte     SizeScale = "b"
	KiloByte SizeScale = "Kb"
	MegaByte SizeScale = "Mb"
	GigaByte           = "Gb"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Report

type Report struct {
	TimeMetrics []TimeMetric
	SizeMetric  SizeMetric
}

func (*Report) Normalize

func (r *Report) Normalize() *Report

func (*Report) Save

func (r *Report) Save(file string) error

func (*Report) String

func (r *Report) String() string

type Size

type Size struct {
	Value float64
	Scale SizeScale
}

func (*Size) Normalize

func (t *Size) Normalize() bool

func (*Size) String

func (t *Size) String() string

type SizeMetric

type SizeMetric struct {
	Key  string
	Size Size
}

func (*SizeMetric) Normalize

func (s *SizeMetric) Normalize()

func (*SizeMetric) String

func (s *SizeMetric) String() string

type SizeScale

type SizeScale string

type Time

type Time struct {
	Value float64
	Scale TimeScale
}

func (*Time) Normalize

func (t *Time) Normalize() bool

func (*Time) String

func (t *Time) String() string

type TimeMetric

type TimeMetric struct {
	Key   string
	Times []*Time
	Avg   *Time
}

func (*TimeMetric) Normalize

func (m *TimeMetric) Normalize()

func (*TimeMetric) String

func (m *TimeMetric) String() string

type TimeScale

type TimeScale string

Jump to

Keyboard shortcuts

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