mirror of
https://github.com/golang/go
synced 2024-11-11 19:51:37 -07:00
doc: make it clear which pprof package is used
Updates #22027. Change-Id: I5a5bae77a744c7a2ecb75172846e6461a98ee8af Reviewed-on: https://go-review.googlesource.com/83916 Reviewed-by: Andrew Bonventre <andybons@golang.org>
This commit is contained in:
parent
513a469119
commit
c4da610197
@ -185,9 +185,19 @@ handler on :7777 at /custom_debug_path/profile:
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/custom_debug_path/profile", pprof.Profile)
|
||||
http.ListenAndServe(":7777", mux)
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
"net/http/pprof"
|
||||
)
|
||||
|
||||
func main() {
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/custom_debug_path/profile", pprof.Profile)
|
||||
log.Fatal(http.ListenAndServe(":7777", mux))
|
||||
}
|
||||
</pre>
|
||||
</p>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user