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 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.
Click to show internal directories.
Click to hide internal directories.