profile

package
v0.0.67 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0, NCSA Imports: 13 Imported by: 0

Documentation

Overview

Package profile provides a simple method for exposing profile information through a --cpu_profile flag. This package also implicitly adds the /debug/pprof/... HTTP handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(ctx context.Context) error

Start begins profiling the program, writing data to the file given with the --cpu_profile flag. If --cpu_profile was not given, nothing happens. Start must not be called again until Stop is called. The profile data in the --cpu_profile flag is overwritten on each call to Start.

func Stop

func Stop() error

Stop stops profiling the program. If --cpu_profile was not given, nothing happens. Start must have be called before a call to Stop.

Types

This section is empty.

Jump to

Keyboard shortcuts

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