pprof

package module
v0.0.0-...-2a62995 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2014 License: Apache-2.0 Imports: 4 Imported by: 1

README

negroni-pprof

GoDoc Build Status

pprof middleware for Negroni

pprof

pprof middleware for Negroni.

A simple middleware for handling pprof. This handles "/debug/pprof" paths

Note: this implementation is sub-optimal, but works.

Usage

import (
    "github.com/codegangsta/negroni"
    "github.com/mistifyio/negroni-pprof"
)

func main() {
    mux := http.NewServeMux()
    mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
      fmt.Fprintf(w, "Welcome to the home page!")
    }
    n := negroni.Classic()
    n.Use(pprof.Pprof())
    n.UseHandler(mux)
    n.Run(":3000")
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pprof

func Pprof() *handler

Pprof returns a handler which will serve pprof data for the path /debug/pprof

Types

This section is empty.

Jump to

Keyboard shortcuts

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