Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for SeatsTimesDuration (0.62 sec)

  1. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/request/seat_seconds_test.go

    		ss     SeatSeconds
    		seats  float64
    		expect time.Duration
    	}{
    		{ss: SeatsTimesDuration(10, time.Second), seats: 1, expect: 10 * time.Second},
    		{ss: SeatsTimesDuration(1, time.Second), seats: 10, expect: 100 * time.Millisecond},
    		{ss: SeatsTimesDuration(13, 5*time.Millisecond), seats: 5, expect: 13 * time.Millisecond},
    		{ss: SeatsTimesDuration(12, 0), seats: 10, expect: 0},
    	}
    	for _, testCase := range testCases {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 29 20:20:16 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/request/seat_seconds.go

    // SeatsTimeDuration produces the SeatSeconds value for the given factors.
    // This is intended only to produce small values, increments in work
    // rather than amount of work done since process start.
    func SeatsTimesDuration(seats float64, duration time.Duration) SeatSeconds {
    	return SeatSeconds(int64(math.Round(seats * float64(duration/time.Nanosecond) / (1e9 / ssScale))))
    }
    
    // ToFloat converts to a floating-point representation.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 20 09:16:46 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/types.go

    	}
    }
    
    func (qs *queueSet) computeInitialWork(we *fcrequest.WorkEstimate) fcrequest.SeatSeconds {
    	return fcrequest.SeatsTimesDuration(float64(we.InitialSeats), qs.estimatedServiceDuration)
    }
    
    func (qs *queueSet) computeFinalWork(we *fcrequest.WorkEstimate) fcrequest.SeatSeconds {
    	return fcrequest.SeatsTimesDuration(float64(we.FinalSeats), we.AdditionalLatency)
    }
    
    func (q *queue) dumpLocked(includeDetails bool) debug.QueueDump {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 18 17:38:43 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/request/mutating_work_estimator.go

    		//   events are equal and try to estimate the cost of a single event based on
    		//   some historical data about size of events.
    		finalSeats = uint64(math.Ceil(float64(watchCount) / e.config.WatchesPerSeat))
    		finalWork := SeatsTimesDuration(float64(finalSeats), e.config.eventAdditionalDuration())
    
    		// While processing individual events is highly parallel,
    		// the design/implementation of P&F has a couple limitations that
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 17 19:26:52 UTC 2023
    - 6K bytes
    - Viewed (0)
Back to top