profiler

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package profiler enables golang profiling tools as a package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Profiler

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

Profiler bundles together net/http/pprof and statsviz

func New

func New() *Profiler

New returns a new profiler server ready for starting

func (*Profiler) Close

func (p *Profiler) Close() error

Close stops the profiler http server ignoring err server closed

func (*Profiler) Start

func (p *Profiler) Start(addr string, enableStatsviz bool)

Start runs a lightweight http server for net/http/pprof with optional stats visualization and launches the http server as a goroutine

Jump to

Keyboard shortcuts

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