Documentation ¶
Overview ¶
Package report is a generated GoMock package.
Index ¶
Constants ¶
const ( // CPUProfileFilenameFmt is the filename format for the CPU profile. // pprof.<app>.<hostname>.samples.cpu.<report_time>.pprof. CPUProfileFilenameFmt = "pprof.%s.%s.samples.cpu.%s.pprof" // HeapProfileFilenameFmt is the filename format for the heap profile. // pprof.<app>.<hostname>.alloc_objects.alloc_space.inuse_objects.inuse_space.<report_time>.pprof. HeapProfileFilenameFmt = "pprof.%s.%s.alloc_objects.alloc_space.inuse_objects.inuse_space.%s.pprof" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockReporter ¶
type MockReporter struct {
// contains filtered or unexported fields
}
MockReporter is a mock of Reporter interface.
func NewMockReporter ¶
func NewMockReporter(ctrl *gomock.Controller) *MockReporter
NewMockReporter creates a new mock instance.
func (*MockReporter) EXPECT ¶
func (m *MockReporter) EXPECT() *MockReporterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockReporter) ReportCPUProfile ¶ added in v0.2.0
ReportCPUProfile mocks base method.
func (*MockReporter) ReportHeapProfile ¶
ReportHeapProfile mocks base method.
type MockReporterMockRecorder ¶
type MockReporterMockRecorder struct {
// contains filtered or unexported fields
}
MockReporterMockRecorder is the mock recorder for MockReporter.
func (*MockReporterMockRecorder) ReportCPUProfile ¶ added in v0.2.0
func (mr *MockReporterMockRecorder) ReportCPUProfile(ctx, r, ci interface{}) *gomock.Call
ReportCPUProfile indicates an expected call of ReportCPUProfile.
func (*MockReporterMockRecorder) ReportHeapProfile ¶
func (mr *MockReporterMockRecorder) ReportHeapProfile(ctx, r, mi interface{}) *gomock.Call
ReportHeapProfile indicates an expected call of ReportHeapProfile.
type Reporter ¶
type Reporter interface { // ReportCPUProfile sends the CPU profiling data to the specific destination. ReportCPUProfile(ctx context.Context, r io.Reader, ci CPUInfo) error // ReportHeapProfile sends the heap profiling data to the specific destination. ReportHeapProfile(ctx context.Context, r io.Reader, mi MemInfo) error }
Reporter is responsible for reporting the profiling report to the destination.
type SlackReporter ¶
type SlackReporter struct {
// contains filtered or unexported fields
}
SlackReporter is the reporter to send the profiling report to the specific Slack channel.
func NewSlackReporter ¶
func NewSlackReporter(opt *SlackReporterOption) *SlackReporter
NewSlackReporter returns the new SlackReporter.
func (*SlackReporter) ReportCPUProfile ¶ added in v0.2.0
ReportCPUProfile sends the CPU profiling data to the Slack.
func (*SlackReporter) ReportHeapProfile ¶
ReportHeapProfile sends the heap profiling data to the Slack.
type SlackReporterOption ¶
SlackReporterOption is the option for the Slack reporter.