Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLiveDatasetSize ¶
func GetLiveDatasetSize() uint64
GetLiveDatasetSize returns the live dataset size in bytes which required by calculating GOGC since go1.19,
gcPercentHeapGoal = c.heapMarked + (c.heapMarked+c.lastStackScan.Load()+c.globalsScan.Load())*uint64(gcPercent)/100
There are some metrics be added in go1.21 to accurately get `heapMarked` and `lastStackScan`, use `/gc/heap/live:bytes` metric as `heapMarked`, and use `/gc/scan/stack:bytes` metric as `lastStackScan`
func GetMemoryLimit ¶
func GetMemoryLimit() uint64
GetMemoryLimit returns system memory limit if cgroup is used, it returns cgroup memory limit
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.