memprofiling

package
v1.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2020 License: MIT Imports: 10 Imported by: 0

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.

func PrintMemUsage

func PrintMemUsage(msg string)

PrintMemUsage prints memory usage.

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 New

func New() *MemProfiling

New returns MemProfiling object.

func (*MemProfiling) Add

func (m *MemProfiling) Add(name string, v interface{})

Add adds variables to watch for profiling.

func (*MemProfiling) Config

func (m *MemProfiling) Config()

Config configures mem profiling.

func (*MemProfiling) PeriodicallyScanMemSize

func (m *MemProfiling) PeriodicallyScanMemSize()

PeriodicallyScanMemSize scans memsize of the observed objects every 30 seconds.

func (*MemProfiling) Start

func (m *MemProfiling) Start()

Start starts profiling server.

func (*MemProfiling) Stop

func (m *MemProfiling) Stop()

Stop stops mem profiling.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL