bench

package
v0.0.0-...-2ac8f1f Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bench

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

func (*Bench) End

func (b *Bench) End()

func (*Bench) IsTestFinished

func (b *Bench) IsTestFinished() bool

func (*Bench) Measure

func (b *Bench) Measure(fn func() error) error

func (*Bench) Results

func (b *Bench) Results() Results

func (*Bench) SetDuration

func (b *Bench) SetDuration(d time.Duration)

func (*Bench) Start

func (b *Bench) Start()

type Results

type Results struct {
	Samples     []time.Duration
	TotDuration time.Duration
}

func (Results) Avg

func (r Results) Avg() time.Duration

func (Results) Percentile

func (r Results) Percentile(pctile float64) time.Duration

Jump to

Keyboard shortcuts

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