Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunProfiler ¶
func RunProfiler(opts Opts) interface{ Stop() }
RunProfiler starts a specific profiler based on the options passed to it. It will return a Stop function that can be deferred
Types ¶
type Opts ¶
type Opts struct { Mem bool `long:"pprof_mem" env:"pprof_mem" description:"Memory profile. Mutually exlusive with all the other modes." ` CPU bool `long:"pprof_cpu" env:"pprof_cpu" description:"CPU profile. Mutually exlusive with all the other modes." ` Trace bool `long:"pprof_trace" env:"pprof_trace" description:"Trace profile. Mutually exlusive with all the other modes." ` Block bool `long:"pprof_block" env:"pprof_block" description:"Block profile. Mutually exlusive with all the other modes." ` Mutex bool `long:"pprof_mutex" env:"pprof_mutex" description:"Mutex profile. Mutually exlusive with all the other modes." ` ProfilePath string `long:"pprof_dir" default:"./" env:"pprof_dir" description:"The ouptut directory where ezpprof will write the file"` }
Opts are options for which profiler you want to run. Note only one of these options should ever be set (aside from the profile path)
Click to show internal directories.
Click to hide internal directories.