gctuner

package
v0.0.0-...-503c688 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// EnableGOGCTuner is to control whether enable the GOGC tuner.
	EnableGOGCTuner atomic.Bool
)
View Source
var GlobalMemoryLimitTuner = &memoryLimitTuner{}

GlobalMemoryLimitTuner only allow one memory limit tuner in one process

Functions

func GetGOGC

func GetGOGC() uint32

GetGOGC returns the current GCPercent.

func SetDefaultGOGC

func SetDefaultGOGC()

SetDefaultGOGC is to set the default GOGC value.

func SetMaxGCPercent

func SetMaxGCPercent(percent uint32)

SetMaxGCPercent sets the max cost of memory.

func SetMinGCPercent

func SetMinGCPercent(percent uint32)

SetMinGCPercent sets the max cost of memory.

func Tuning

func Tuning(threshold uint64)

Tuning sets the threshold of heap which will be respect by gogc tuner. When Tuning, the env GOGC will not be take effect. threshold: disable tuning if threshold == 0

func WaitMemoryLimitTunerExitInTest

func WaitMemoryLimitTunerExitInTest()

WaitMemoryLimitTunerExitInTest is used to wait memory limit tuner exit in test.

Types

This section is empty.

Jump to

Keyboard shortcuts

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