Skip to content

Commit

Permalink
make code easier to read
Browse files Browse the repository at this point in the history
  • Loading branch information
samos123 committed Nov 5, 2023
1 parent 3d91330 commit b2151d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions autoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ func (a *Autoscaler) Start() {
// by the user.
// Note this uses the default queue size, not the current queue size.
// the current queue size increases and decreases based on replica count
queueSize := a.FIFO.size
ceil := math.Ceil(flt)
scale := ceil / float64(queueSize)
concurrencyPerReplica := a.FIFO.size
normalized := flt / float64(concurrencyPerReplica)
ceil := math.Ceil(normalized)
log.Printf("Average for deployment: %s: %v (ceil: %v), current wait count: %v", deploymentName, flt, ceil, waitCount)
a.Scaler.SetDesiredScale(deploymentName, int32(scale))
a.Scaler.SetDesiredScale(deploymentName, int32(ceil))
}
}
}
Expand Down

0 comments on commit b2151d1

Please sign in to comment.