pprof

package
v0.1.1-pprof-4 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pprof

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

Pprof is used to analyse the performance sp service

func NewPprof

func NewPprof(cfg *PprofConfig) *Pprof

NewPprof returns an instance of pprof

func (*Pprof) Name

func (p *Pprof) Name() string

Name describes pprof service name

func (*Pprof) Start

func (p *Pprof) Start(ctx context.Context) error

Start HTTP server

func (*Pprof) Stop

func (p *Pprof) Stop(ctx context.Context) error

Stop HTTP server

type PprofConfig

type PprofConfig struct {
	Enabled     bool   `toml:",omitempty"`
	HTTPAddress string `toml:",omitempty"`
}

PprofConfig contains the configuration for pprof.

Jump to

Keyboard shortcuts

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