Skip to content

Commit

Permalink
Merge pull request etcd-io#5895 from smallfish/master
Browse files Browse the repository at this point in the history
etcdserver/api/v2http, Documentation: fix debug pprof index miss / in end
  • Loading branch information
xiang90 authored Jul 12, 2016
2 parents b2c1112 + e6d15b9 commit b9f6de9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Documentation/op-guide/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ Follow the instructions when using these flags.
## Profiling flags

### --enable-pprof
+ Enable runtime profiling data via HTTP server. Address is at client URL + "/debug/pprof"
+ Enable runtime profiling data via HTTP server. Address is at client URL + "/debug/pprof/"
+ default: false

[build-cluster]: clustering.md#static
Expand Down
2 changes: 1 addition & 1 deletion Documentation/v2/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Follow the instructions when using these flags.
## Profiling flags

### --enable-pprof
+ Enable runtime profiling data via HTTP server. Address is at client URL + "/debug/pprof"
+ Enable runtime profiling data via HTTP server. Address is at client URL + "/debug/pprof/"
+ default: false

[build-cluster]: clustering.md#static
Expand Down
2 changes: 1 addition & 1 deletion etcdmain/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func NewConfig() *config {
fs.IntVar(&cfg.autoCompactionRetention, "auto-compaction-retention", 0, "Auto compaction retention for mvcc key value store in hour. 0 means disable auto compaction.")

// pprof profiler via HTTP
fs.BoolVar(&cfg.enablePprof, "enable-pprof", false, "Enable runtime profiling data via HTTP server. Address is at client URL + \"/debug/pprof\"")
fs.BoolVar(&cfg.enablePprof, "enable-pprof", false, "Enable runtime profiling data via HTTP server. Address is at client URL + \"/debug/pprof/\"")

// ignored
for _, f := range cfg.ignored {
Expand Down
2 changes: 1 addition & 1 deletion etcdmain/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,6 @@ given by the consensus protocol.
profiling flags:
--enable-pprof 'false'
Enable runtime profiling data via HTTP server. Address is at client URL + "/debug/pprof"
Enable runtime profiling data via HTTP server. Address is at client URL + "/debug/pprof/"
`
)
2 changes: 1 addition & 1 deletion etcdserver/api/v2http/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func NewClientHandler(server *etcdserver.EtcdServer, timeout time.Duration) http
if server.IsPprofEnabled() {
plog.Infof("pprof is enabled under %s", pprofPrefix)

mux.HandleFunc(pprofPrefix, pprof.Index)
mux.HandleFunc(pprofPrefix+"/", pprof.Index)
mux.HandleFunc(pprofPrefix+"/profile", pprof.Profile)
mux.HandleFunc(pprofPrefix+"/symbol", pprof.Symbol)
mux.HandleFunc(pprofPrefix+"/cmdline", pprof.Cmdline)
Expand Down

0 comments on commit b9f6de9

Please # to comment.