Skip to content

Commit

Permalink
Merge pull request #89071 from knz/backport22.2-89069
Browse files Browse the repository at this point in the history
  • Loading branch information
knz authored Sep 30, 2022
2 parents 058cd57 + fbf6363 commit 600df9f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/util/admission/grant_coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,9 +653,11 @@ func (coord *GrantCoordinator) GetWorkQueue(workKind WorkKind) *WorkQueue {
func (coord *GrantCoordinator) CPULoad(runnable int, procs int, samplePeriod time.Duration) {
ctx := coord.ambientCtx.AnnotateCtx(context.Background())

if coord.lastCPULoadSamplePeriod != 0 && coord.lastCPULoadSamplePeriod != samplePeriod &&
KVAdmissionControlEnabled.Get(&coord.settings.SV) {
log.Infof(ctx, "CPULoad switching to period %s", samplePeriod.String())
if log.V(1) {
if coord.lastCPULoadSamplePeriod != 0 && coord.lastCPULoadSamplePeriod != samplePeriod &&
KVAdmissionControlEnabled.Get(&coord.settings.SV) {
log.Infof(ctx, "CPULoad switching to period %s", samplePeriod.String())
}
}
coord.lastCPULoadSamplePeriod = samplePeriod

Expand Down

0 comments on commit 600df9f

Please sign in to comment.