rclone/lib/debug/common.go
Anagh Kumar Baranwal 0c56c46523 rc: Add commands to set GC Percent & Memory Limit (1.19+)
Signed-off-by: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com>
2022-11-10 12:07:18 +00:00

12 lines
322 B
Go

// Package debug contains functions for dealing with runtime/debug functions across go versions
package debug
import (
"runtime/debug"
)
// SetGCPercent calls the runtime/debug.SetGCPercent function to set the garbage
// collection percentage.
func SetGCPercent(percent int) int {
return debug.SetGCPercent(percent)
}