profiling

package
v1.36.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package profiling provides helpers for CPU and memory profiling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stop

type Stop func() error

Stop is a function returned by Start that stops profiling and flushes any buffered data. It must be called (typically via defer) when the profiled section of code completes.

func Start

func Start(cpuProfile, memProfile string) (Stop, error)

Start begins CPU and/or memory profiling based on the provided file paths. Pass an empty string to skip the corresponding profile. The returned Stop function must be called to finalise the profiles.

Jump to

Keyboard shortcuts

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