debug

package
v2.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

Package debug interfaces Go runtime debugging facilities. This package is mostly glue code making these facilities available through the CLI and RPC subsystem. If you want to use them from Go code, use package runtime instead.

Index

Constants

This section is empty.

Variables

View Source
var Flags = []cli.Flag{
	verbosityFlag, vmoduleFlag, backtraceAtFlag, debugFlag,
	pprofFlag, pprofAddrFlag, pprofPortFlag,
	memprofilerateFlag, blockprofilerateFlag, cpuprofileFlag, traceFlag,
}

Flags holds all command-line flags required for debugging.

View Source
var Handler = new(HandlerT)

Handler is the global debugging handler.

Functions

func Exit

func Exit()

Exit stops all running profiles, flushing their output to the respective file.

func LoudPanic

func LoudPanic(x interface{})

LoudPanic panics in a way that gets all goroutine stacks printed on stderr.

func Setup

func Setup(ctx *cli.Context, logdir string) error

Setup initializes profiling and logging based on the CLI flags. It should be called as early as possible in the program.

func StartPProf

func StartPProf(address string)

Types

type