Lines Matching refs:pprof
5 // Package pprof serves via its HTTP server runtime profiling data
6 // in the format expected by the pprof visualization tool.
10 // The handled paths all begin with /debug/pprof/.
12 // To use pprof, link this package into your program:
13 // import _ "net/http/pprof"
23 // Then use the pprof tool to look at the heap profile:
25 // go tool pprof http://localhost:6060/debug/pprof/heap
29 // go tool pprof http://localhost:6060/debug/pprof/profile
34 // go tool pprof http://localhost:6060/debug/pprof/block
38 // wget http://localhost:6060/debug/pprof/trace?seconds=5
40 // To view all available profiles, open http://localhost:6060/debug/pprof/
47 package pprof
59 "runtime/pprof"
67 http.Handle("/debug/pprof/", http.HandlerFunc(Index))
68 http.Handle("/debug/pprof/cmdline", http.HandlerFunc(Cmdline))
69 http.Handle("/debug/pprof/profile", http.HandlerFunc(Profile))
70 http.Handle("/debug/pprof/symbol", http.HandlerFunc(Symbol))
71 http.Handle("/debug/pprof/trace", http.HandlerFunc(Trace))
76 // The package initialization registers it as /debug/pprof/cmdline.
93 // Profile responds with the pprof-formatted cpu profile.
94 // The package initialization registers it as /debug/pprof/profile.
104 if err := pprof.StartCPUProfile(w); err != nil {
114 pprof.StopCPUProfile()
119 // The package initialization registers it as /debug/pprof/trace.
143 // The package initialization registers it as /debug/pprof/symbol.
152 // do have symbol information. Pprof only cares whether
199 p := pprof.Lookup(string(name))
213 // Index responds with the pprof-formatted profile named by the request.
214 // For example, "/debug/pprof/heap" serves the "heap" profile.
215 // Index responds to a request for "/debug/pprof/" with an HTML page
218 if strings.HasPrefix(r.URL.Path, "/debug/pprof/") {
219 name := strings.TrimPrefix(r.URL.Path, "/debug/pprof/")
226 profiles := pprof.Profiles()
234 <title>/debug/pprof/</title>
237 /debug/pprof/<br>