profiler

package
v1.16.44 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package profiler provides CPU, memory, and lock profiling utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Dir         string        `json:"dir"`
	Enabled     bool          `json:"enabled"`
	Freq        time.Duration `json:"freq"`
	MaxNumFiles int           `json:"maxNumFiles"`
}

Config for continuous profiler.

type ContinuousProfiler

type ContinuousProfiler interface {
	Dispatch() error
	Shutdown()
}

ContinuousProfiler periodically captures profiles.

func NewContinuous

func NewContinuous(dir string, freq time.Duration, maxNumFiles int) ContinuousProfiler

NewContinuous returns a new continuous profiler.

type Profiler

type Profiler interface {
	StartCPUProfiler() error
	StopCPUProfiler() error
	MemoryProfile() error
	LockProfile() error
}

Profiler provides methods for measuring process performance.

func New

func New(dir string) Profiler

New returns a new Profiler that writes to the given directory.

Jump to

Keyboard shortcuts

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