profiling

package
v1.101.16 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package profiling allows accessing the pprof profiling data via the HTTP interface of the Go program. It provides an HTTP handler that can be registered to an HTTP router to expose pprof profiling data.

The tool pprof provides a way to analyze the performance of Go programs. It can be used to generate a profile of a Go program, display the profile in a web browser, and analyze the profile data.

For an example implementation, see the pkg/httpserver/config.go file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PProfHandler

func PProfHandler(w http.ResponseWriter, r *http.Request)

PProfHandler exposes pprof profiling data. It is intended to be registered to a router. The option parameter is the pprof profile to be exposed. If option is empty, the pprof index page is shown. If option is "cmdline", "profile", "symbol" or "trace", the respective pprof handler is called. For any other value of option, the pprof.Handler is called with the option as argument.

Types

This section is empty.

Jump to

Keyboard shortcuts

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