garbage

package module
v0.0.0-...-9ef8f8c Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2016 License: MIT Imports: 8 Imported by: 0

README

pprof-garbage: memory garbage profile for Go

pprof-garbage provides a memory profile for garbage objects/allocations over a given duration.

Documentation on godoc.org

Demo on play.golang.org

Documentation

Overview

Package pprof-garbage writes runtime profiling data in the format expected by the pprof visualization tool. The profile shows estimates for garbage allocations over a given time duration:

go tool pprof http://127.0.0.1:6000/debug/pprof/garbage?debug=1

See https://github.com/golang/go/issues/16629 for more details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Garbage

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

Garbage returns an HTTP handler that serves the garbage profile.

func WriteGarbageProfile

func WriteGarbageProfile(w io.Writer, duration time.Duration, debug bool)

WriteGarbageProfile writes a pprof-formatted snapshot of the garbage profile to w. The profile runs twice as long as duration: the first half is calculating the GC period for the duration. The debug parameter enables additional output.

Types

This section is empty.

Jump to

Keyboard shortcuts

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