You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's no substantial runtime cost to serving the endpoints by default,
and when things hit the fan you always need to query them in situ.
Signed-off-by: Steve Kuznetsov <[email protected]>
cmd.Flags().StringVarP(&s.terminationLog, "termination-log", "t", "/dev/termination-log", "path to a container termination log file")
82
82
cmd.Flags().StringVarP(&s.port, "port", "p", "50051", "port number to serve on")
83
-
cmd.Flags().StringVar(&s.pprofAddr, "pprof-addr", "", "address of startup profiling endpoint (addr:port format)")
83
+
cmd.Flags().StringVar(&s.pprofAddr, "pprof-addr", "localhost:6060", "address of startup profiling endpoint (addr:port format)")
84
84
cmd.Flags().StringVar(&s.cacheDir, "cache-dir", "", "if set, sync and persist server cache directory")
85
85
cmd.Flags().BoolVar(&s.cacheOnly, "cache-only", false, "sync the serve cache and exit without serving")
86
86
cmd.Flags().BoolVar(&s.cacheEnforceIntegrity, "cache-enforce-integrity", false, "exit with error if cache is not present or has been invalidated. (default: true when --cache-dir is set and --cache-only is false, false otherwise), ")
87
87
returncmd
88
88
}
89
89
90
90
func (s*serve) run(ctx context.Context) error {
91
+
ifs.pprofAddr=="" {
92
+
s.logger.Fatal("--pprof-addr cannot be empty")
93
+
}
91
94
p:=newProfilerInterface(s.pprofAddr, s.logger)
92
95
iferr:=p.startEndpoint(); err!=nil {
93
96
returnfmt.Errorf("could not start pprof endpoint: %v", err)
0 commit comments