Documentation
¶
Overview ¶
Package autopprof is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnsupportedPlatform = fmt.Errorf( "autopprof: unsupported platform (only Linux is supported)", ) ErrInvalidCPUThreshold = fmt.Errorf( "autopprof: cpu threshold value must be between 0 and 1", ) ErrInvalidMemThreshold = fmt.Errorf( "autopprof: memory threshold value must be between 0 and 1", ) ErrInvalidGoroutineThreshold = fmt.Errorf( "autopprof: goroutine threshold value must be greater than to 0", ) ErrNilReporter = fmt.Errorf("autopprof: Reporter can't be nil") ErrDisableAllProfiling = fmt.Errorf("autopprof: all profiling is disabled") )
Errors.
Functions ¶
Types ¶
type Mockprofiler ¶ added in v0.2.0
type Mockprofiler struct {
// contains filtered or unexported fields
}
Mockprofiler is a mock of profiler interface.
func NewMockprofiler ¶ added in v0.2.0
func NewMockprofiler(ctrl *gomock.Controller) *Mockprofiler
NewMockprofiler creates a new mock instance.
func (*Mockprofiler) EXPECT ¶ added in v0.2.0
func (m *Mockprofiler) EXPECT() *MockprofilerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockprofilerMockRecorder ¶ added in v0.2.0
type MockprofilerMockRecorder struct {
// contains filtered or unexported fields
}
MockprofilerMockRecorder is the mock recorder for Mockprofiler.
type Option ¶
type Option struct {
// DisableCPUProf disables the CPU profiling.
DisableCPUProf bool
// DisableMemProf disables the memory profiling.
DisableMemProf bool
// DisableGoroutineProf disables the goroutine profiling.
DisableGoroutineProf bool
// CPUThreshold is the cpu usage threshold (between 0 and 1)
// to trigger the cpu profiling.
// Autopprof will start the cpu profiling when the cpu usage
// is higher than this threshold.
CPUThreshold float64
// MemThreshold is the memory usage threshold (between 0 and 1)
// to trigger the heap profiling.
// Autopprof will start the heap profiling when the memory usage
// is higher than this threshold.
MemThreshold float64
// GoroutineThreshold is the goroutine count threshold to trigger the goroutine profiling.
// to trigger the goroutine profiling.
// Autopprof will start the goroutine profiling when the goroutine count
// is higher than this threshold.
GoroutineThreshold int
// deprecated: use reportAll instead.
// ReportBoth sets whether to trigger reports for both CPU and memory when either threshold is exceeded.
// If some profiling is disabled, exclude it.
ReportBoth bool
// ReportAll sets whether to trigger reports for all profiling types when any threshold is exceeded.
// If some profiling is disabled, exclude it.
ReportAll bool
// Reporter is the reporter to send the profiling report implementing
// the report.Reporter interface.
Reporter report.Reporter
}
Option is the configuration for the autopprof.
Click to show internal directories.
Click to hide internal directories.

