pprof

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrServerDoneBeforeReady = errors.New("server terminated before being ready")

Functions

func NewServer

func NewServer(address string, logger httpserver.Logger,
	options ...httpserver.Option) *httpserver.Server

NewServer creates a new Pprof server which will listen at the address specified.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is a pprof http server service compatible with the dot/service.go interface.

func NewService

func NewService(settings Settings, logger httpserver.Logger) *Service

NewService creates a pprof server service compatible with the dot/service.go interface.

func (*Service) Start

func (s *Service) Start() (err error)

Start starts the pprof server service.

func (*Service) Stop

func (s *Service) Stop() (err error)

Stop stops the pprof server service.

type Settings

type Settings struct {
	// ListeningAddress is the HTTP pprof server
	// listening address.
	ListeningAddress string
	// See runtime.SetBlockProfileRate
	// Set to 0 to disable profiling.
	BlockProfileRate int
	// See runtime.SetMutexProfileFraction
	// Set to 0 to disable profiling.
	MutexProfileRate int
}

Settings are the settings for the Pprof service.

func (Settings) String

func (s Settings) String() string

Jump to

Keyboard shortcuts

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