expvpp

package
v1.25.4 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPercent

func NewPercent(name string, n string, d string) *expvar.Func

NewPercent creates a new expvar.Func that calculates the ratio of two expvar.Int or expvar.Float metrics.

func ServeMux

func ServeMux() *http.ServeMux

ServeMux returns a new http.ServeMux that removes cmdline and memstats from expvar default exports. See: https://github.com/golang/go/issues/29105

Types

type Average

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

Average is a structure to maintain a running average using expvar.Float.

func NewAverage

func NewAverage(name string, length int) *Average

NewAverage creates and initializes a new Average instance.

func (*Average) Append

func (v *Average) Append(delta float64)

Adds a new value to the running average.

func (*Average) String

func (v *Average) String() string

String returns the string representation of the average.

Jump to

Keyboard shortcuts

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