profiling

package
v0.0.0-...-6815946 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: Apache-2.0 Imports: 9 Imported by: 27 modules, 50 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// ProfilingPortKey specified the name of an environment variable that
	// may be used to override the default profiling port.
	ProfilingPortKey = "PROFILING_PORT"

	// ProfilingPort specifies the default port where profiling data is available when profiling is enabled
	ProfilingPort = 8008
)

Variables

This section is empty.

Functions

func NewServer

func NewServer(handler http.Handler) *http.Server

NewServer creates a new http server that exposes profiling data on the default profiling port

func ReadProfilingFlag

func ReadProfilingFlag(config map[string]string) (bool, error)

Types

type Handler

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

Handler holds the main HTTP handler and a flag indicating whether the handler is active

func NewHandler

func NewHandler(logger *zap.SugaredLogger, enableProfiling bool) *Handler

NewHandler create a new ProfilingHandler which serves runtime profiling data according to the given context path

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Handler) UpdateFromConfigMap

func (h *Handler) UpdateFromConfigMap(configMap *corev1.ConfigMap)

UpdateFromConfigMap modifies the Enabled flag in the Handler according to the value in the given ConfigMap

Jump to

Keyboard shortcuts

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