pprof

package
v4.29.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

README

pprof Routes

Deprecated: register pprof routes on the service's own go-restful container instead. This package registers them on the global http.DefaultServeMux, which panics when two services in one process use the same base path. It is kept for compatibility and gets no new features.

This package adds pprof profiling routes to go-restful apps.

Usage

Importing
import "github.com/AccelByte/go-restful-plugins/v4/pkg/profiling/pprof"
Add pprof routes
pprof.Route("/basepath")

Now the pprof paths can be accessed from http://host:port/basepath/debug/pprof.

Reference: https://golang.org/pkg/net/http/pprof/

Documentation

Overview

Package pprof registers net/http/pprof handlers under a base path on http.DefaultServeMux.

Deprecated: register pprof routes on the service's own go-restful container instead. This package registers them on the global http.DefaultServeMux, which panics when two services in one process use the same base path. It is kept for compatibility and gets no new features.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Route

func Route(basePath string)

Route registers pprof routes based on the basepath

Types

This section is empty.

Jump to

Keyboard shortcuts

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