Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for getReplicasChangePerPeriod (0.44 sec)

  1. pkg/controller/podautoscaler/horizontal.go

    		hpa.Spec.Behavior.ScaleDown.StabilizationWindowSeconds = &stabilizationWindowSeconds
    	}
    }
    
    // getReplicasChangePerPeriod function find all the replica changes per period
    func getReplicasChangePerPeriod(periodSeconds int32, scaleEvents []timestampedScaleEvent) int32 {
    	period := time.Second * time.Duration(periodSeconds)
    	cutoff := time.Now().Add(-period)
    	var replicas int32
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 63.6K bytes
    - Viewed (0)
  2. pkg/controller/podautoscaler/horizontal_test.go

    			hcUp := HorizontalController{
    				scaleUpEvents: map[string][]timestampedScaleEvent{
    					tc.key: append([]timestampedScaleEvent{}, tc.prevScaleEvents...),
    				},
    			}
    			gotReplicasChangeUp := getReplicasChangePerPeriod(60, hcUp.scaleUpEvents[tc.key])
    			assert.Equal(t, tc.expectedReplicasChange, gotReplicasChangeUp)
    			hcUp.storeScaleEvent(behaviorUp, tc.key, 10, 10+tc.replicaChange)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 199.3K bytes
    - Viewed (0)
Back to top