pprof

package
v0.7.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func WithAddress

func WithAddress(address string) Option

func WithIdleTimeout

func WithIdleTimeout(timeout time.Duration) Option

func WithReadTimeout

func WithReadTimeout(timeout time.Duration) Option

func WithWriteTimeout

func WithWriteTimeout(timeout time.Duration) Option

type Options

type Options struct {
	Address      string
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	IdleTimeout  time.Duration
}

type ProfileProfiler

type ProfileProfiler struct {
	// contains filtered or unexported fields
}

"Profile"是指性能分析数据,"Profiler"是指生成和处理这些数据的工具

func New

func New(opts ...Option) *ProfileProfiler

func (*ProfileProfiler) Serve

func (pp *ProfileProfiler) Serve() error

创建mux自定义处理函数,避免与pprof的默认http.DefaultServeMux冲突 mux := http.NewServeMux() mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {}) http.ListenAndServe("ip:port", mux)

Jump to

Keyboard shortcuts

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