pprof

package
v0.0.0-...-f8c0f81 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2011 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package pprof serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool. For more information about pprof, see http://code.google.com/p/google-perftools/.

The package is typically only imported for the side effect of registering its HTTP handlers. The handled paths all begin with /debug/pprof/.

To use pprof, link this package into your program:

import _ "http/pprof"

Then use the pprof tool to look at the heap profile:

pprof http://localhost:6060/debug/pprof/heap

Or to look at a 30-second CPU profile:

pprof http://localhost:6060/debug/pprof/profile

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmdline

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

Cmdline responds with the running program's command line, with arguments separated by NUL bytes. The package initialization registers it as /debug/pprof/cmdline.

func Heap

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

Heap responds with the pprof-formatted heap profile. The package initialization registers it as /debug/pprof/heap.

func Profile

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

Profile responds with the pprof-formatted cpu profile. The package initialization registers it as /debug/pprof/profile.

func Symbol

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

Symbol looks up the program counters listed in the request, responding with a table mapping program counters to function names. The package initialization registers it as /debug/pprof/symbol.

Types

This section is empty.

Jump to

Keyboard shortcuts

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