pprof

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunGC

func RunGC()

RunGC triggers garbage collection.

func SaveAllocProfile

func SaveAllocProfile(profileDir string) (string, error)

SaveAllocProfile saves an allocation profile to the specified directory.

func SaveHeapProfile

func SaveHeapProfile(profileDir string) (string, error)

SaveHeapProfile saves a heap profile to the specified directory.

Types

type CPUProfiler

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

CPUProfiler manages on-demand CPU profiling.

func (*CPUProfiler) StartCPUProfile

func (c *CPUProfiler) StartCPUProfile(profileDir string) error

StartCPUProfile starts CPU profiling, writing to the specified directory when stopped.

func (*CPUProfiler) StopCPUProfile

func (c *CPUProfiler) StopCPUProfile() (string, error)

StopCPUProfile stops CPU profiling and returns the path to the profile file.

type ProfileSession

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

func BeginProfiling

func BeginProfiling(profileDir string, logWriter io.Writer) *ProfileSession

BeginProfiling starts CPU and memory profiling, writing the profiles to the specified directory.

func (*ProfileSession) Stop

func (p *ProfileSession) Stop()

Jump to

Keyboard shortcuts

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