Fix the profiling...
This commit is contained in:
parent
1683675807
commit
0989c78d4b
16
cmd/root.go
16
cmd/root.go
|
@ -93,21 +93,21 @@ func rootCmdRun(*cobra.Command, []string) {
|
||||||
|
|
||||||
switch profiler {
|
switch profiler {
|
||||||
case "cpu":
|
case "cpu":
|
||||||
profile.Start(profile.CPUProfile)
|
defer profile.Start(profile.CPUProfile).Stop()
|
||||||
case "mem":
|
case "mem":
|
||||||
profile.Start(profile.MemProfile)
|
defer profile.Start(profile.MemProfile).Stop()
|
||||||
case "alloc":
|
case "alloc":
|
||||||
profile.Start(profile.MemProfileAllocs())
|
defer profile.Start(profile.MemProfile, profile.MemProfileAllocs()).Stop()
|
||||||
case "heap":
|
case "heap":
|
||||||
profile.Start(profile.MemProfileHeap())
|
defer profile.Start(profile.MemProfile, profile.MemProfileHeap()).Stop()
|
||||||
case "routines":
|
case "routines":
|
||||||
profile.Start(profile.GoroutineProfile)
|
defer profile.Start(profile.GoroutineProfile).Stop()
|
||||||
case "mutex":
|
case "mutex":
|
||||||
profile.Start(profile.MutexProfile)
|
defer profile.Start(profile.MutexProfile).Stop()
|
||||||
case "threads":
|
case "threads":
|
||||||
profile.Start(profile.ThreadcreationProfile)
|
defer profile.Start(profile.ThreadcreationProfile).Stop()
|
||||||
case "block":
|
case "block":
|
||||||
profile.Start(profile.BlockProfile)
|
defer profile.Start(profile.BlockProfile).Stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only attempt configuration file relocation if a custom location has not
|
// Only attempt configuration file relocation if a custom location has not
|
||||||
|
|
Loading…
Reference in New Issue
Block a user