profiling

package
v0.4.48 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupPprofHttpServer

func SetupPprofHttpServer(port uint16) *http.Server

SetupPprofHttpServer does two things:

  1. Because importing "net/http/pprof" automatically binds profiling endpoints to http.DefaultServeMux, this function replaces http.DefaultServeMux with a new mux. This to ensure profiling endpoints are exposed on a separate mux available only from localhost.Hence, this function should be called before adding any other endpoints to http.DefaultServeMux.
  2. Returns a http server serving net/http/pprof endpoints on localhost:port.

Types

This section is empty.

Jump to

Keyboard shortcuts

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