Documentation ¶
Index ¶
- Constants
- type MetricCircle
- type Option
- func WithCPUMax(max int) Option
- func WithCPURule(min int, diff int, abs int, coolDown time.Duration) Option
- func WithGrtRule(min int, diff int, abs int, max int, coolDown time.Duration) Option
- func WithLogger(log *logger.Logger) Option
- func WithMaxAge(age int) Option
- func WithMaxNum(num int) Option
- func WithMemRule(min int, diff int, abs int, coolDown time.Duration) Option
- func WithMonitorInterval(interval time.Duration) Option
- func WithSavePath(dumpPath string) Option
- type RuleType
- type Sherlock
- func (s *Sherlock) DisableCPUDump()
- func (s *Sherlock) DisableGrtDump()
- func (s *Sherlock) DisableMemDump()
- func (s *Sherlock) EnableCPUDump()
- func (s *Sherlock) EnableGrtDump()
- func (s *Sherlock) EnableMemDump()
- func (s *Sherlock) Set(opts ...Option)
- func (s *Sherlock) Start()
- func (s *Sherlock) Stop()
Constants ¶
const ( Memory configureType = iota CPU Goroutine )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricCircle ¶
type MetricCircle struct {
// contains filtered or unexported fields
}
type Option ¶
type Option func(opts *options)
func WithCPUMax ¶
WithCPUMax : set the CPUMaxPercent parameter as max
func WithCPURule ¶
WithCPURule set the cpu rule options.
func WithGrtRule ¶
WithGrtRule set the goroutine rule options.
func WithLogger ¶
func WithMaxAge ¶ added in v1.2.0
WithMaxAge set the maximum number of days to retain old profile files based on the timestamp encoded in their filename
func WithMaxNum ¶ added in v1.2.0
WithMaxNum set the maximum number of old profile files to retain
func WithMemRule ¶
WithMemRule set the memory rule options.
func WithMonitorInterval ¶
WithMonitorInterval set: interval
func WithSavePath ¶
WithSavePath set the profile export path
type Sherlock ¶
type Sherlock struct {
// contains filtered or unexported fields
}
func (*Sherlock) DisableCPUDump ¶
func (s *Sherlock) DisableCPUDump()
DisableCPUDump disables the cpu dump.
func (*Sherlock) DisableGrtDump ¶
func (s *Sherlock) DisableGrtDump()
DisableGrtDump disables the goroutine dump.
func (*Sherlock) DisableMemDump ¶
func (s *Sherlock) DisableMemDump()
DisableMemDump disables the mem dump.
func (*Sherlock) EnableCPUDump ¶
func (s *Sherlock) EnableCPUDump()
EnableCPUDump enables the cpu dump.
func (*Sherlock) EnableGrtDump ¶
func (s *Sherlock) EnableGrtDump()
EnableGrtDump enables the goroutine dump.
func (*Sherlock) EnableMemDump ¶
func (s *Sherlock) EnableMemDump()
EnableMemDump enables the mem dump.