speed

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metric

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

func NewMetric

func NewMetric() *Metric

func (*Metric) Add

func (s *Metric) Add(n uint64)

func (*Metric) Consume

func (s *Metric) Consume() uint64

func (*Metric) ConsumeSpeed

func (s *Metric) ConsumeSpeed() string

func (*Metric) Rate

func (s *Metric) Rate() float64

func (*Metric) Report

func (s *Metric) Report(ctx context.Context, name string) func() error

func (*Metric) Write

func (s *Metric) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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