Documentation ¶
Index ¶
- type CallOption
- type Client
- func (client *Client) BinaryDump(ctx context.Context, writer io.Writer) error
- func (client *Client) Connect(ctx context.Context, serverAddress string) error
- func (client *Client) GC(ctx context.Context) error
- func (client *Client) GetInfo(ctx context.Context) (*InfoType, error)
- func (client *Client) LookupProfile(ctx context.Context, t LookupType, writer io.Writer) error
- func (client *Client) NonLookupProfile(ctx context.Context, t NonLookupType, d time.Duration, writer io.Writer) error
- func (client *Client) Set(ctx context.Context, v Variable, r int) (int, error)
- func (client *Client) SetCallOption(option *CallOption) error
- func (client *Client) SetCallOptions(options ...*CallOption) (err error)
- func (client *Client) SetDialOption(option *DialOption) error
- func (client *Client) SetDialOptions(options ...*DialOption) (err error)
- func (client *Client) Stop() error
- func (client *Client) StopNonLookupProfile(ctx context.Context, t NonLookupType) (err error)
- type DialOption
- type FileInfo
- type IDName
- type InfoType
- type LookupType
- type MemStats
- type NonLookupType
- type ProcessStats
- type Variable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallOption ¶
type CallOption struct {
// contains filtered or unexported fields
}
CallOption will create a Call Option for the GRPC Profile Client
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client will store GRPC Profile Client instance. We can create a instance of the client using `NewClient()` function
func NewClient ¶
func NewClient(ctx context.Context, serverAddress string, options ...*DialOption) (client *Client, err error)
NewClient function will create a GRPC Profile Client instance
func (*Client) BinaryDump ¶
BinaryDump function will get a binary dump of the remote binary
func (*Client) LookupProfile ¶
LookupProfile will run a profile for lookup pprof type
func (*Client) NonLookupProfile ¶
func (client *Client) NonLookupProfile(ctx context.Context, t NonLookupType, d time.Duration, writer io.Writer) error
NonLookupProfile will run a profile for non lookup pprof type
func (*Client) SetCallOption ¶
func (client *Client) SetCallOption(option *CallOption) error
SetCallOption function will be used to set `CallOption` to GRPC Profile Client
func (*Client) SetCallOptions ¶
func (client *Client) SetCallOptions(options ...*CallOption) (err error)
SetCallOptions function will be used to set `CallOption`s to GRPC Profile Client
func (*Client) SetDialOption ¶
func (client *Client) SetDialOption(option *DialOption) error
SetDialOption function will be used to set `DialOption` to GRPC Profile Client
func (*Client) SetDialOptions ¶
func (client *Client) SetDialOptions(options ...*DialOption) (err error)
SetDialOptions function will be used to set `DialOption`s to GRPC Profile Client
func (*Client) StopNonLookupProfile ¶
func (client *Client) StopNonLookupProfile(ctx context.Context, t NonLookupType) (err error)
StopNonLookupProfile will stop non lookup profile type (if running)
type DialOption ¶
type DialOption struct {
// contains filtered or unexported fields
}
DialOption will create a Dial Option for the GRPC Profile Client
func DialAuthTypeInsecure ¶
func DialAuthTypeInsecure() *DialOption
DialAuthTypeInsecure function will create a Insecure Auth type GRPC Profile Client Dial option
func DialAuthTypeTLS ¶
func DialAuthTypeTLS(certFile string) *DialOption
DialAuthTypeTLS function will create a TLS Secure Auth type GRPC Profile Client Dial option
type InfoType ¶
type InfoType struct { GOOS string GOARCH string GOMAXPROCS int NumCPU int NumCgoCall int NumGoroutine int Version string ProcessStats ProcessStats MemStats MemStats MemProfileRate int }
InfoType will store all informations about the agent
type LookupType ¶
type LookupType int
LookupType is type for GRPC Profile LookupType
const ( // HeapType - Memory / Heap Profile Type HeapType LookupType = iota // MutexType - Mutex Profile Type MutexType // BlockType - Block Profile Type BlockType // ThreadCreateType - ThreadCreate Profile Type ThreadCreateType // GoRoutineType - GoRoutine Profile Type GoRoutineType )
type MemStats ¶
type MemStats struct { Alloc uint64 TotalAlloc uint64 Sys uint64 Lookups uint64 Mallocs uint64 Frees uint64 HeapAlloc uint64 HeapSys uint64 HeapIdle uint64 HeapInuse uint64 HeapReleased uint64 HeapObjects uint64 StackInuse uint64 StackSys uint64 MSpanInuse uint64 MSpanSys uint64 MCacheInuse uint64 MCacheSys uint64 BuckHashSys uint64 GCSys uint64 OtherSys uint64 NextGC uint64 LastGC time.Time PauseTotalNs time.Duration LastPause time.Time NumGC uint32 NumForcedGC uint32 }
MemStats will store status about the memory
type NonLookupType ¶
type NonLookupType int
NonLookupType is type for GRPC Profile NonLookupType
const ( // CPUType - CPU profile type CPUType NonLookupType = iota // TraceType - Trace Profile Type TraceType )
type ProcessStats ¶
type ProcessStats struct { Environ []string Executable string ExecutableLStat FileInfo ExecutableStat FileInfo UID IDName GID IDName EUID IDName EGID IDName Groups []IDName PageSize int PID int PPID int WD string Hostname string UserCacheDir string UserConfigDir string UserHomeDir string }
ProcessStats will store status about the process
type Variable ¶
type Variable int
Variable is type for GRPC Profile Variable
const ( // MemProfRate controls the fraction of memory allocations that are recorded and reported in the memory profile. // The profiler aims to sample an average of one allocation per MemProfileRate bytes allocated. // To include every allocated block in the profile, set MemProfileRate to 1. To turn off profiling entirely, set // MemProfileRate to 0. MemProfRate Variable = iota // CPUProfRate controls CPU profiling rate to hz samples per second. If hz <= 0, SetCPUProfileRate turns off // profiling. If the profiler is on, the rate cannot be changed without first turning it off. CPUProfRate // MutexProfileFraction controls the fraction of mutex contention events that are reported in the mutex profile. // On average 1/rate events are reported. To turn off profiling entirely, pass rate 0. MutexProfileFraction // BlockProfileRate controls the fraction of goroutine blocking events that are reported in the blocking profile. // The profiler aims to sample an average of one blocking event per rate nanoseconds spent blocked. // To include every blocking event in the profile, pass rate = 1. To turn off profiling entirely, pass rate <= 0. BlockProfileRate )