Adjust comments
This commit is contained in:
parent
3756ce4977
commit
1c56d53a6b
@ -425,6 +425,7 @@ func (l *limiter) Limit(cpu, memory bool) error {
|
||||
// limitCPU will limit the CPU usage of this process. The limit is the max. CPU usage
|
||||
// normed to 0-1. The interval defines how long a time slot is that will be splitted
|
||||
// into sleeping and working.
|
||||
// Inspired by https://github.com/opsengine/cpulimit
|
||||
func (l *limiter) limitCPU(ctx context.Context, limit float64, interval time.Duration) {
|
||||
defer func() {
|
||||
l.lock.Lock()
|
||||
|
||||
@ -43,7 +43,7 @@ type Process interface {
|
||||
// running or not.
|
||||
IsRunning() bool
|
||||
|
||||
// Limit enabled or disables CPU and memory limiting. CPU will be throttled
|
||||
// Limit enables or disables CPU and memory limiting. CPU will be throttled
|
||||
// into the configured limit. If memory consumption is above the configured
|
||||
// limit, the process will be killed.
|
||||
Limit(cpu, memory bool) error
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user