Skip to content

Commit

Permalink
internal/coordinator/pool: fix gce quota message
Browse files Browse the repository at this point in the history
Remove stray queue length call, which wasn't even in the correct spot
for Sprintf.

For golang/go#48857

Change-Id: I98bb33f0b3e51d5abe25d1675554b96be893b1f9
Reviewed-on: https://go-review.googlesource.com/c/build/+/419433
Auto-Submit: Jenny Rakoczy <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Run-TryBot: Jenny Rakoczy <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
  • Loading branch information
toothrot authored and gopherbot committed Jul 28, 2022
1 parent b32452c commit 90a9c13
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/coordinator/pool/gce.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,14 +491,13 @@ func (p *GCEBuildlet) String() string {
func (p *GCEBuildlet) capacityString() string {
p.mu.Lock()
defer p.mu.Unlock()
qLen := p.cpuQueue.Len()
cpuUsage, cpuLimit := p.cpuQueue.Quotas()
c2Usage, c2Limit := p.c2cpuQueue.Quotas()
instUsage, instLimit := p.instQueue.Quotas()
n2Usage, n2Limit := p.n2cpuQueue.Quotas()
n2dUsage, n2dLimit := p.n2dcpuQueue.Quotas()
return fmt.Sprintf("%d/%d instances; %d/%d CPUs (%d), %d/%d C2_CPUS, %d/%d N2_CPUS, %d/%d N2D_CPUS",
instUsage, instLimit, qLen,
return fmt.Sprintf("%d/%d instances; %d/%d CPUs, %d/%d C2_CPUS, %d/%d N2_CPUS, %d/%d N2D_CPUS",
instUsage, instLimit,
cpuUsage, cpuLimit,
c2Limit, c2Usage,
n2Limit, n2Usage,
Expand Down

0 comments on commit 90a9c13

Please sign in to comment.