Documentation ¶
Index ¶
Constants ¶
View Source
const (
MemProfilingPortDiff = 1000
)
Constants for mem profiling.
Variables ¶
This section is empty.
Functions ¶
func MaybeCallGCPeriodically ¶
func MaybeCallGCPeriodically()
MaybeCallGCPeriodically runs GC manually every gcTime minutes. This is one of the options to mitigate the OOM issue.
Types ¶
type MemProfiling ¶
type MemProfiling struct {
// contains filtered or unexported fields
}
MemProfiling is the struct to watch objects for memprofiling.
func GetMemProfiling ¶
func GetMemProfiling() *MemProfiling
GetMemProfiling returns a pointer of MemProfiling.
func (*MemProfiling) Add ¶
func (m *MemProfiling) Add(name string, v interface{})
Add adds variables to watch for profiling.
func (*MemProfiling) PeriodicallyScanMemSize ¶
func (m *MemProfiling) PeriodicallyScanMemSize()
PeriodicallyScanMemSize scans memsize of the observed objects every 30 seconds.
Click to show internal directories.
Click to hide internal directories.