Add goroutine profiles (#9078)

Allow downloading goroutine dump to help detect leaks
or overuse of goroutines.

Extensions are now type dependent.

Change `profiling` -> `profile` prefix, since that is what they are 
not the abstract concept.
This commit is contained in:
Klaus Post
2020-03-04 15:58:12 +01:00
committed by GitHub
parent 8fbf2b0b2a
commit f1b2462193
3 changed files with 34 additions and 16 deletions

View File

@@ -33,12 +33,13 @@ type ProfilerType string
// Different supported profiler types.
const (
ProfilerCPU ProfilerType = "cpu" // represents CPU profiler type
ProfilerMEM ProfilerType = "mem" // represents MEM profiler type
ProfilerBlock ProfilerType = "block" // represents Block profiler type
ProfilerMutex ProfilerType = "mutex" // represents Mutex profiler type
ProfilerTrace ProfilerType = "trace" // represents Trace profiler type
ProfilerThreads ProfilerType = "threads" // represents ThreadCreate profiler type
ProfilerCPU ProfilerType = "cpu" // represents CPU profiler type
ProfilerMEM ProfilerType = "mem" // represents MEM profiler type
ProfilerBlock ProfilerType = "block" // represents Block profiler type
ProfilerMutex ProfilerType = "mutex" // represents Mutex profiler type
ProfilerTrace ProfilerType = "trace" // represents Trace profiler type
ProfilerThreads ProfilerType = "threads" // represents ThreadCreate profiler type
ProfilerGoroutines ProfilerType = "goroutines" // represents Goroutine dumps.
)
// StartProfilingResult holds the result of starting