timeutils

package
v1.62.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: GPL-3.0 Imports: 6 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TrackStage added in v1.62.0

func TrackStage[T any](s *Stopwatch, name string, f func() (T, error)) (T, error)

Types

type Stopwatch

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

func NewStopwatch

func NewStopwatch(name string, log logutils.Log) *Stopwatch

func (*Stopwatch) Print

func (s *Stopwatch) Print()

func (*Stopwatch) PrintStages

func (s *Stopwatch) PrintStages()

func (*Stopwatch) PrintTopStages added in v1.21.0

func (s *Stopwatch) PrintTopStages(n int)

func (*Stopwatch) TrackStage

func (s *Stopwatch) TrackStage(name string, f func())

func (*Stopwatch) TrackStageErr added in v1.62.0

func (s *Stopwatch) TrackStageErr(name string, f func() error) error

Jump to

Keyboard shortcuts

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