Add pprof trace support

Add pprof trace support and --enable-contention-profiling to those
components that don't already have it.

Kubernetes-commit: b011529d8a1486bc2316a049db35759086d2994b
This commit is contained in:
Andy Goldstein 2017-02-28 13:43:08 -05:00 committed by Kubernetes Publisher
parent a22f78080a
commit 33e10a040b
2 changed files with 2 additions and 1 deletions

View File

@ -42,7 +42,7 @@ func (o *FeatureOptions) AddFlags(fs *pflag.FlagSet) {
fs.BoolVar(&o.EnableProfiling, "profiling", o.EnableProfiling,
"Enable profiling via web interface host:port/debug/pprof/")
fs.BoolVar(&o.EnableContentionProfiling, "contention-profiling", o.EnableContentionProfiling,
"Enable contention profiling. Requires --profiling to be set to work.")
"Enable lock contention profiling, if profiling is enabled")
fs.BoolVar(&o.EnableSwaggerUI, "enable-swagger-ui", o.EnableSwaggerUI,
"Enables swagger ui on the apiserver at /swagger-ui")
}

View File

@ -30,4 +30,5 @@ func (d Profiling) Install(c *mux.APIContainer) {
c.UnlistedRoutes.HandleFunc("/debug/pprof/", pprof.Index)
c.UnlistedRoutes.HandleFunc("/debug/pprof/profile", pprof.Profile)
c.UnlistedRoutes.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
c.UnlistedRoutes.HandleFunc("/debug/pprof/trace", pprof.Trace)
}