Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachSlowTickLogger ¶
func AttachSlowTickLogger(srv *golem.Server, opts SlowTickLoggerOptions)
AttachSlowTickLogger logs slow ticks and periodic rolling wall-time samples.
func AttachTickProfiler ¶
func AttachTickProfiler(srv *golem.Server, opts TickProfilerOptions)
AttachTickProfiler labels pprof samples by tick and optionally wraps each tick in a runtime/trace region.
func StartPprof ¶
StartPprof starts a pprof debug HTTP server on addr (e.g. "127.0.0.1:6060"). All pprof handlers are mounted on a dedicated ServeMux so http.DefaultServeMux is not affected. Call from main when a debug flag is set; never import this package in production binaries.
Types ¶
type SlowTickLoggerOptions ¶
type SlowTickLoggerOptions struct {
Budget time.Duration
Interval time.Duration
Window int
Logf func(format string, args ...any)
MessagePrefix string
}
SlowTickLoggerOptions configures AttachSlowTickLogger.
type TickProfilerOptions ¶
TickProfilerOptions configures AttachTickProfiler.
Click to show internal directories.
Click to hide internal directories.