Skip to content

Commit

Permalink
Merge pull request #89070 from knz/20220930-admission2
Browse files Browse the repository at this point in the history
  • Loading branch information
knz authored Sep 30, 2022
2 parents 825232c + 49602a7 commit f416936
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/util/admission/granter.go
Original file line number Diff line number Diff line change
Expand Up @@ -929,9 +929,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 f416936

Please sign in to comment.