commander

package module
v0.0.0-...-d518773 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BlockProfileFlag string

BlockProfileFlag is a filename to write the stack traces that caused blocking on synchronization primitives.

View Source
var CPUProfileFlag string

CPUProfileFlag is a filename to write a CPU profile.

View Source
var HeapProfileFlag string

HeapProfileFlag is a filename to write a heap profile.

View Source
var ThreadProfileFlag string

ThreadProfileFlag is a filename to write the stack traces that caused new OS threads to be created.

Functions

func Close

func Close()

Close finishes the profiles and closes their files. Close should be run at the end of the program's execution, possibly through a defer statement in the main method.

func Init

func Init() error

Init creates the files named by any of the *ProfileFlag variables. If an error is returned, the program can still function, but the file that failed to open and any further files will not contain profiles. Close must still be called at the end of the program, however, as earlier profiles are not cancelled by later profiles failing.

func RegisterFlags

func RegisterFlags(f *flag.FlagSet)

RegisterFlags must be called before Init and before f.Parse. If you are not allocating your own FlagSet, pass flag.CommandLine as the argument. If you are using a different command line argument parsing package, you will need to assign the values of *ProfileFlag on your own.

Types

This section is empty.

Jump to

Keyboard shortcuts

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