trace

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tracer

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

func New

func New(enabled bool) *Tracer

func (*Tracer) Start added in v0.3.3

func (t *Tracer) Start(label string) func()

Start begins timing a step and returns a function that records its duration. When tracing is disabled, returns a no-op with zero allocations.

func (*Tracer) Total

func (t *Tracer) Total()

Total prints the total elapsed time since the tracer was created.

Jump to

Keyboard shortcuts

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