Skip to content

Commit 52dd229

Browse files
committed
change default cooldown to 10s
1 parent b02706c commit 52dd229

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

internal/internal_poller_autoscaler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626

2727
// defaultPollerScalerCooldownInSeconds
2828
const (
29-
defaultPollerAutoScalerCooldown = time.Minute
29+
defaultPollerAutoScalerCooldown = 10 * time.Second
3030
defaultPollerAutoScalerTargetUtilization = 0.6
3131
defaultMinConcurrentActivityPollerSize = 1
3232
defaultMinConcurrentDecisionPollerSize = 2

internal/worker/concurrency_auto_scaler.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ import (
3434
)
3535

3636
const (
37-
defaultAutoScalerUpdateTick = time.Second
38-
lowerPollerWaitTime = 16 * time.Millisecond
39-
upperPollerWaitTime = 256 * time.Millisecond
37+
defaultAutoScalerUpdateTick = time.Second
38+
lowerPollerWaitTime = 16 * time.Millisecond
39+
upperPollerWaitTime = 256 * time.Millisecond
4040
numberOfPollsInRollingAverage = 20
4141

4242
autoScalerEventPollerUpdate autoScalerEvent = "update-poller-limit"
@@ -253,7 +253,7 @@ func (c *ConcurrencyAutoScaler) scaleDownPollerPermit(pollerWaitTime time.Durati
253253

254254
// smoothingFunc is a log2 function with offset to smooth the scaling and address 0 values
255255
func smoothingFunc(x time.Duration) float64 {
256-
return math.Log2(2+ float64(x/time.Millisecond))
256+
return math.Log2(2 + float64(x/time.Millisecond))
257257
}
258258

259259
type number interface {

0 commit comments

Comments
 (0)