debug

package
v0.0.0-...-e623927 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(activities ...Activity) (func(), error)

Start the given LXD daemon debug activities.

Return a function that can be used to stop all debug activities that were started, along with an error if any activity could not be started.

Types

type Activity

type Activity func() (activityFunc, error)

Activity creates a specific debug activity function, returning an error if it can't be created for some reason.

func CPU

func CPU(filename string) Activity

CPU starts the Go CPU profiler, dumping to the given file.

func Goroutines

func Goroutines(seconds int) Activity

Goroutines starts a task to print the goroutines stack at the given interval.

func Memory

func Memory(filename string) Activity

Memory is a debug activity that perpetually watches for SIGUSR1 signals and dumps the memory to the given file whenever the signal is received.

If the given filename is the empty string, no profiler is started.

Jump to

Keyboard shortcuts

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