pprof

package
v0.0.0-...-3da4c06 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CPU = "cpu"
)

Constants for profile names

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled            bool
	ListenAddr         string
	Folder             string
	ProfileNames       []string
	ProfileIntervals   []int
	ProfileDebugValues []int
}

Config is the config for the pprof service

func (Config) String

func (p Config) String() string

type Profile

type Profile struct {
	Name       string
	Interval   int
	Debug      int
	ProfileRef *pprof.Profile
}

type Service

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

Service provides access to pprof profiles via HTTP and can save them to local disk periodically as user settings.

func NewService

func NewService(cfg Config) *Service

NewService creates the new pprof service

func (*Service) Start

func (s *Service) Start() error

Start start the service

func (*Service) Stop

func (s *Service) Stop() error

Stop stop the service

Jump to

Keyboard shortcuts

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