utils

package
v0.0.0-...-513e322 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunProgram

func RunProgram(testFn func() error) error

RunProgram parses flags (for profiling), and executes the testFn

Types

type SlidingAverage

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

SlidingAverage implements a decaying moving average.

func NewSlidingAverage

func NewSlidingAverage() *SlidingAverage

func (*SlidingAverage) Add

func (sa *SlidingAverage) Add(sample int)

func (*SlidingAverage) Avg

func (sa *SlidingAverage) Avg() float64

Jump to

Keyboard shortcuts

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