pprof

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package pprof enables use of pprof in Cilium

Index

Constants

View Source
const (
	// Pprof is the flag to enable the registration of pprof HTTP handlers
	Pprof = "pprof"

	// PprofAddress is the flag to set the address that pprof listens on
	PprofAddress = "pprof-address"

	// PprofPort is the flag to set the port that pprof listens on
	PprofPort = "pprof-port"
)

Variables

View Source
var Cell = cell.Module(
	"pprof",
	"pprof HTTP server to expose runtime profiling data",

	cell.Provide(newServer),
	cell.Invoke(func(srv Server) {}),
)

Cell creates the cell for pprof, that registers its HTTP handlers to serve profiling data in the format expected by the pprof visualization tool.

Functions

func Enable deprecated

func Enable(host string, port int)

Enable runs an HTTP server to serve the pprof API

Deprecated: use pprof.Cell() instead.

Types

type Config added in v1.14.0

type Config struct {
	Pprof        bool
	PprofAddress string
	PprofPort    uint16
}

Config contains the configuration for the pprof cell.

func (Config) Flags added in v1.14.0

func (def Config) Flags(flags *pflag.FlagSet)

type Server added in v1.14.0

type Server interface {
	// Port returns the port at which the server is listening
	Port() int
}

Jump to

Keyboard shortcuts

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