gctuner

package
v1.1.0-beta.0...-57a73ea Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 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 MaxGCPercent

func MaxGCPercent() uint32

MaxGCPercent get the max cost of memory.

func MinGCPercent

func MinGCPercent() uint32

MinGCPercent get the min cost of memory.

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