Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProfileEndpoints = [...]string{ ProfileTypeUnknown: "", ProfileTypeHeap: "heap", ProfileTypeProfile: "profile", ProfileTypeBlock: "block", ProfileTypeTrace: "trace", ProfileTypeAllocs: "allocs", ProfileTypeMutex: "mutex", ProfileTypeGoroutine: "goroutine", ProfileTypeThreadCreate: "threadcreate", }
ProfileEndpoints array maps ProfileType to the string endpoint for pprof
Functions ¶
func NewProfilingCommand ¶
func NewProfilingCommand(p *pkg.AdminParams) *cobra.Command
NewProfilingCommand creates a profiling command
Types ¶
type DownloadOptions ¶
DownloadOptions interface to manipulate the http request to pprof server
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
Downloader struct holds all private fields
func (*Downloader) Download ¶
func (d *Downloader) Download(t ProfileType, output io.Writer, options ...DownloadOptions) error
Download specific type of profile with options
type OptionProfilingTime ¶
OptionProfilingTime is option to add a seconds param in the http request
type ProfileDownloader ¶
type ProfileDownloader interface {
Download(ProfileType, io.Writer, ...DownloadOptions) error
}
ProfileDownloader interface for profile downloader
func NewDownloader ¶
func NewDownloader(cfgGetter RestConfigGetter, podName, namespace string, endCh <-chan struct{}) (ProfileDownloader, error)
NewDownloader returns the profiling downloader and setup connections asynchronously
type ProfileType ¶
type ProfileType int
ProfileType enums for all supported profiles
const ( ProfileTypeUnknown ProfileType = iota ProfileTypeHeap ProfileTypeProfile ProfileTypeBlock ProfileTypeTrace ProfileTypeAllocs ProfileTypeMutex ProfileTypeGoroutine ProfileTypeThreadCreate )
type RestConfigGetter ¶
RestConfigGetter interface to get restconfig
Click to show internal directories.
Click to hide internal directories.