Documentation
¶
Overview ¶
Package flightrec pkg/flightrec/flightrec.go c1-util-debug
A process-wide execution-trace flight recorder (runtime/trace): it keeps the last few seconds of trace in memory, so a stall that is over before anyone looks can still be seen. A detector calls Snapshot when it notices one, and Handler serves the current window on demand.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
Handler serves the current window as a trace file for `go tool trace`. The window is buffered first so a slow client cannot hold Stop up.
func Snapshot ¶
func Snapshot(reason string)
Snapshot saves the current window to a file named for reason, at most once a minute, in the background so the caller is never held. It keeps the last few files.
Types ¶
This section is empty.