pprof

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package pprof captures Go profiles from a service's net/http/pprof endpoint, through the runtime's forwarding.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(env core.Env, c *spec.Component) (any, error)

func Top

func Top(ctx context.Context, file string) string

Top is `go tool pprof -top` for a profile file, "" when Go is not installed.

Types

type Options

type Options struct {
	// Port is used for services without a pprof probe; default their metrics port.
	Port string `yaml:"port"`
	Path string `yaml:"path"`
	// Summary runs `go tool pprof -top` on each profile when Go is installed.
	Summary *bool `yaml:"summary"`
}

type Profiler

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

func (*Profiler) Capture

func (p *Profiler) Capture(ctx context.Context, r core.ProfileRequest) (core.Profile, error)

func (*Profiler) Kinds

func (p *Profiler) Kinds() []string

Jump to

Keyboard shortcuts

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