Documentation ¶
Index ¶
- Constants
- func Gather(ctx context.Context, addr string, p Profile) (prof *profile.Profile, err error)
- func GatherAll(ctx context.Context, logger *zap.Logger, addr string) (map[Profile]*profile.Profile, error)
- func GatherAllByPod(ctx context.Context, logger *zap.Logger, host string, pod corev1.Pod, ...) (map[Profile]*profile.Profile, error)
- func GetProfefePortByPod(pod corev1.Pod) int
- func NewProfile(r io.Reader) (*profile.Profile, error)
- type Profile
Constants ¶
View Source
const ( DefaultProfilePath = "/debug/pprof" DefaultProfilePort = 6060 )
Variables ¶
This section is empty.
Functions ¶
func GatherAll ¶
func GatherAll(ctx context.Context, logger *zap.Logger, addr string) (map[Profile]*profile.Profile, error)
GatherAll downloads all profile types from address.
func GatherAllByPod ¶
func GetProfefePortByPod ¶
Types ¶
type Profile ¶
type Profile int
Profile defines the types of profiles available.
const ( // Allocs returns a sampling of all past memory allocations for addr at // addr/debug/pprof/allocs. Allocs Profile = iota // Block are stack traces that led to blocking on sync primitives. Block // Goroutine are stack traces of all current goroutines. Goroutine // Heap is a sampling of memory allocations of live objects. Heap // Mutex are stack traces of holders of contended mutexes. Mutex //ThreadCreate are Stack traces that led to the creation of new OS threads. ThreadCreate // CPUProfile returns a CPU profile for addr at addr/debug/pprof/profile?seconds=seconds. CPUProfile )
Click to show internal directories.
Click to hide internal directories.