- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for calculateCPUMaximum (0.15 sec)
-
pkg/kubelet/kuberuntime/kuberuntime_container_windows.go
if securitycontext.HasWindowsHostProcessRequest(pod, container) { wc.SecurityContext.HostProcess = true } return wc, nil } // calculateCPUMaximum calculates the maximum CPU given a limit and a number of cpus while ensuring it's in range [1,10000]. func calculateCPUMaximum(cpuLimit *resource.Quantity, cpuCount int64) int64 { cpuMaximum := 10 * cpuLimit.MilliValue() / cpuCount // ensure cpuMaximum is in range [1, 10000].
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 22:40:29 UTC 2024 - 8K bytes - Viewed (0) -
pkg/kubelet/kuberuntime/kuberuntime_container_windows_test.go
cpuLimit: resource.MustParse("1m"), cpuCount: 100, want: 1, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { assert.Equal(t, tt.want, calculateCPUMaximum(&tt.cpuLimit, tt.cpuCount)) }) } } func TestCalculateWindowsResources(t *testing.T) { // TODO: remove skip once the failing test has been fixed. t.Skip("Skip failing test on Windows.")
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 25 14:24:16 UTC 2024 - 5.3K bytes - Viewed (0)