Skip to content

Commit

Permalink
change default cooldown to 10s
Browse files Browse the repository at this point in the history
  • Loading branch information
shijiesheng committed Jan 17, 2025
1 parent b02706c commit 52dd229
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/internal_poller_autoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

// defaultPollerScalerCooldownInSeconds
const (
defaultPollerAutoScalerCooldown = time.Minute
defaultPollerAutoScalerCooldown = 10 * time.Second
defaultPollerAutoScalerTargetUtilization = 0.6
defaultMinConcurrentActivityPollerSize = 1
defaultMinConcurrentDecisionPollerSize = 2
Expand Down
8 changes: 4 additions & 4 deletions internal/worker/concurrency_auto_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import (
)

const (
defaultAutoScalerUpdateTick = time.Second
lowerPollerWaitTime = 16 * time.Millisecond
upperPollerWaitTime = 256 * time.Millisecond
defaultAutoScalerUpdateTick = time.Second
lowerPollerWaitTime = 16 * time.Millisecond
upperPollerWaitTime = 256 * time.Millisecond
numberOfPollsInRollingAverage = 20

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

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

type number interface {
Expand Down

0 comments on commit 52dd229

Please sign in to comment.