profile

package
v0.0.62 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0, NCSA Imports: 13 Imported by: 2

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