debug

package
v0.5.21 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func End

func End(name string)

End completes a timing block and records it

func IsEnabled

func IsEnabled() bool

IsEnabled returns true if debug mode is on

func PrintTimings

func PrintTimings()

PrintTimings outputs all timings in human-readable format

func Printf

func Printf(format string, args ...any)

Printf logs debug messages if enabled

func Start

func Start(name string) func()

Start marks the beginning of a timing block; returns a function to call End

Types

type TimingEntry

type TimingEntry struct {
	Name      string
	Duration  time.Duration
	Timestamp time.Time
}

TimingEntry represents a timed measurement

func Timings

func Timings() []TimingEntry

Timings returns all recorded timings

Jump to

Keyboard shortcuts

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