stats

package
v0.0.0-...-cad7fec Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LossStats

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

func NewLossStats

func NewLossStats(logs PerfLogs) LossStats

func (*LossStats) LossStatsFor

func (l *LossStats) LossStatsFor(stream string) (*StreamLossStats, error)

func (*LossStats) Streams

func (l *LossStats) Streams() []string

type PerfLog

type PerfLog struct {
	Stream string
	types.Timing
	SequenceId int
	// contains filtered or unexported fields
}

func NewPerfLog

func NewPerfLog(line string) *PerfLog

NewPerfLog creates a PerfLog from a line parsing it or returning nil if there is an error

func (*PerfLog) Bloat

func (t *PerfLog) Bloat() float64

func (*PerfLog) ElapsedEpoc

func (t *PerfLog) ElapsedEpoc() float64

type PerfLogs

type PerfLogs []PerfLog

type ResourceMetrics

type ResourceMetrics struct {
	Samples []Sample
}

func NewResourceMetrics

func NewResourceMetrics() *ResourceMetrics

func (*ResourceMetrics) AddSample

func (rm *ResourceMetrics) AddSample(sample *Sample)

type Sample

type Sample struct {
	Time        int64
	CPUCores    string
	MemoryBytes string
}

func (*Sample) CPUCoresAsFloat

func (s *Sample) CPUCoresAsFloat() float64

func (*Sample) MemoryBytesAsFloat

func (s *Sample) MemoryBytesAsFloat() float64

type Statistics

type Statistics struct {
	Logs      PerfLogs
	MsgSize   int
	TimeDiffs []float64
	Elapsed   time.Duration
	Losses    LossStats
}

func NewStatisics

func NewStatisics(logs PerfLogs, msgSize int, elapsed time.Duration) *Statistics

func (*Statistics) GenericMean

func (stats *Statistics) GenericMean(f func(l *PerfLog) float64) float64

func (*Statistics) Max

func (stats *Statistics) Max() float64

func (*Statistics) Mean

func (stats *Statistics) Mean() float64

func (*Statistics) MeanBloat

func (stats *Statistics) MeanBloat() float64

func (*Statistics) Median

func (stats *Statistics) Median() float64

func (*Statistics) Min

func (stats *Statistics) Min() float64

func (*Statistics) TotMessages

func (stats *Statistics) TotMessages() int

type StreamLossStats

type StreamLossStats struct {
	MinSeqId  int
	MaxSeqId  int
	Collected int
	Purged    int
	Entries   []PerfLog
}

func (*StreamLossStats) PercentCollected

func (l *StreamLossStats) PercentCollected() float64

func (*StreamLossStats) Range

func (s *StreamLossStats) Range() int

Range is difference between the first and last collected sequence ids

Jump to

Keyboard shortcuts

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