Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServlet ¶
NewServlet returns a Servlet which can serve pprof requests
/debug/pprof/ is the homepage /debug/pprof/ui/ is the same homepage, but where all links point to a UI instead of raw downloads /debug/pprof/*/ are the raw handlers /debug/pprof/ui/*/ are the same handlers, but with a rendered UI
Types ¶
type Profiler ¶
func NewProfiler ¶
Example ¶
package main import ( "github.com/Shopify/goose/profiler" ) func main() { cpuFile := "cpu.prof" memoryFile := "memory.prof" p := profiler.NewProfiler(cpuFile, memoryFile) if err := p.Start(); err != nil { panic(err) } // Do stuff if err := p.End(); err != nil { panic(err) } }
Output:
Click to show internal directories.
Click to hide internal directories.