pprof

package
v1.15.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 6

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

type Config struct {
	Pprof        bool
	PprofAddress string
	PprofPort    uint16
}

Config contains the configuration for the pprof cell.

func (Config) Flags

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

type Server

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