Skip to content

Commit

Permalink
doc: make it clear which pprof package is used
Browse files Browse the repository at this point in the history
Updates #22027.

Change-Id: I5a5bae77a744c7a2ecb75172846e6461a98ee8af
Reviewed-on: https://go-review.googlesource.com/83916
Reviewed-by: Andrew Bonventre <andybons@golang.org>
  • Loading branch information
rakyll committed Dec 14, 2017
1 parent 513a469 commit c4da610
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions doc/diagnostics.html
Expand Up @@ -185,9 +185,19 @@ <h2 id="profiling">Profiling</h2>

<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>

Expand Down

0 comments on commit c4da610

Please sign in to comment.