Versions in this module Expand all Collapse all v1 v1.2.0 Dec 2, 2022 Changes in this version type Option + func WithFile(use bool) Option v1.0.0 Dec 1, 2022 Changes in this version + const NotSupportTypeMaxConfig + const TrimResultMaxBytes + const TrimResultTopN + const UniformLogFormat + func NewFileLog(path string, level mlog.Level) mlog.ErrorLogger + func NewStdLogger() mlog.ErrorLogger + type DumpOptions struct + DumpFullStack bool + DumpPath string + DumpProfileType dumpProfileType + DumpToLogger bool + type Holmes struct + func New(opts ...Option) (*Holmes, error) + func (h *Holmes) Alertf(alert string, format string, args ...interface{}) + func (h *Holmes) Debugf(format string, args ...interface{}) + func (h *Holmes) DisableCPUDump() *Holmes + func (h *Holmes) DisableGCHeapDump() *Holmes + func (h *Holmes) DisableGoroutineDump() *Holmes + func (h *Holmes) DisableMemDump() *Holmes + func (h *Holmes) DisableProfileReporter() + func (h *Holmes) DisableShrinkThread() *Holmes + func (h *Holmes) DisableThreadDump() *Holmes + func (h *Holmes) EnableCPUDump() *Holmes + func (h *Holmes) EnableDump(curCPU int) (err error) + func (h *Holmes) EnableGCHeapDump() *Holmes + func (h *Holmes) EnableGoroutineDump() *Holmes + func (h *Holmes) EnableMemDump() *Holmes + func (h *Holmes) EnableProfileReporter() + func (h *Holmes) EnableShrinkThread() *Holmes + func (h *Holmes) EnableThreadDump() *Holmes + func (h *Holmes) Errorf(format string, args ...interface{}) + func (h *Holmes) Infof(format string, args ...interface{}) + func (h *Holmes) ReportProfile(pType string, filename string, reason ReasonType, eventID string, ...) + func (h *Holmes) Set(opts ...Option) error + func (h *Holmes) Start() + func (h *Holmes) Stop() + func (h *Holmes) Warnf(format string, args ...interface{}) + type Option interface + func WithBinaryDump() Option + func WithCGroup(useCGroup bool) Option + func WithCPUCore(cpuCore float64) Option + func WithCPUDump(min int, diff int, abs int, coolDown time.Duration) Option + func WithCPUMax(max int) Option + func WithCollectInterval(interval string) Option + func WithDumpPath(dumpPath string) Option + func WithDumpToLogger(new bool) Option + func WithFullStack(isFull bool) Option + func WithGCHeapDump(min int, diff int, abs int, coolDown time.Duration) Option + func WithGoProcAsCPUCore(enabled bool) Option + func WithGoroutineDump(min int, diff int, abs int, max int, coolDown time.Duration) Option + func WithLogger(logger mlog.ErrorLogger) Option + func WithMemDump(min int, diff int, abs int, coolDown time.Duration) Option + func WithMemoryLimit(limit uint64) Option + func WithProfileReporter(r ProfileReporter) Option + func WithShrinkThread(threshold int, delay time.Duration) Option + func WithTextDump() Option + func WithThreadDump(min, diff, abs int, coolDown time.Duration) Option + type ProfileReporter interface + Report func(pType string, filename string, reason ReasonType, eventID string, ...) error + type ReasonType uint8 + const ReasonCurGreaterAbs + const ReasonCurGreaterMax + const ReasonCurlGreaterMin + const ReasonCurlLessMin + const ReasonDiff + func (rt ReasonType) String() string + type ReporterOptions struct + type Scene struct + Avg int + CurVal int + func (base *Scene) Set(min, abs, diff int, coolDown time.Duration) + type ShrinkThrOptions struct + Delay time.Duration + Enable bool + Threshold int