profiling

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: Apache-2.0 Imports: 11 Imported by: 8

Documentation

Index

Constants

View Source
const ExternalConfigName = "profiling"

ExternalConfigName is the external config name of profiling.

Variables

This section is empty.

Functions

func Disable

func Disable() nirvana.Configurer

Disable returns a configurer to disable profiling.

func Path

func Path(path string) nirvana.Configurer

Path returns a configurer to set metrics path. Default path is /debug/pprof. Then these path is used:

/debug/pprof/cmdline
/debug/pprof/profile
/debug/pprof/symbol
/debug/pprof/trace
/debug/pprof/{prof}

Types

type Option

type Option struct {
	// Path is profiling path.
	Path string `desc:"Profiling path"`
}

Option contains basic configurations of profiling.

func NewDefaultOption added in v0.2.0

func NewDefaultOption() *Option

NewDefaultOption creates default option.

func (*Option) Configure

func (p *Option) Configure(cfg *nirvana.Config) error

Configure configures nirvana config via current options.

func (*Option) Name

func (p *Option) Name() string

Name returns plugin name.

Jump to

Keyboard shortcuts

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