From 1c56d53a6bfbe65cab272212df0d5eb859bad016 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Wed, 21 Aug 2024 17:02:22 +0200 Subject: [PATCH] Adjust comments --- process/limiter.go | 1 + process/process.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/process/limiter.go b/process/limiter.go index 79f791e3..ea5df9c2 100644 --- a/process/limiter.go +++ b/process/limiter.go @@ -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() diff --git a/process/process.go b/process/process.go index c6bc01c8..0fe0d45f 100644 --- a/process/process.go +++ b/process/process.go @@ -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