Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for SeatSeconds (0.34 sec)

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

    	"testing"
    	"time"
    )
    
    // TestSeatSecondsString exercises the SeatSeconds constructor and de-constructors (String, ToFloat).
    func TestSeatSecondsString(t *testing.T) {
    	testCases := []struct {
    		ss          SeatSeconds
    		expectFloat float64
    		expectStr   string
    	}{
    		{ss: SeatSeconds(1), expectFloat: 1.0 / ssScale, expectStr: "0.00000001ss"},
    		{ss: SeatSeconds(ssScale - 1), expectFloat: (ssScale - 1) / ssScale, expectStr: "0.99999999ss"},
    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

    // MinSeatSeconds is the lowest representable value of SeatSeconds
    const MinSeatSeconds = SeatSeconds(0)
    
    // 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 {
    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

    	arrivalR fcrequest.SeatSeconds
    
    	// startTime is the real time when the request began executing
    	startTime time.Time
    
    	// Indicates whether client has called Request::Wait()
    	waitStarted bool
    }
    
    type completedWorkEstimate struct {
    	fcrequest.WorkEstimate
    	totalWork fcrequest.SeatSeconds // initial plus final work
    	finalWork fcrequest.SeatSeconds // only final work
    }
    
    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/fairqueuing/queueset/fifo_list_test.go

    	update := func(we *queueSum, req *request, multiplier int) {
    		we.InitialSeatsSum += multiplier * req.InitialSeats()
    		we.MaxSeatsSum += multiplier * req.MaxSeats()
    		we.TotalWorkSum += fcrequest.SeatSeconds(multiplier) * req.totalWork()
    	}
    
    	assert := func(t *testing.T, want, got *queueSum) {
    		if !reflect.DeepEqual(want, got) {
    			t.Errorf("Expected queue work estimate to match, diff: %s", cmp.Diff(want, got))
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 28 08:48:40 UTC 2022
    - 7.8K bytes
    - Viewed (0)
Back to top