Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for GetCPUs (0.28 sec)

  1. pkg/kubelet/apis/podresources/testing/provider_mock.go

    }
    
    // GetCPUs mocks base method.
    func (m *MockCPUsProvider) GetCPUs(podUID, containerName string) []int64 {
    	m.ctrl.T.Helper()
    	ret := m.ctrl.Call(m, "GetCPUs", podUID, containerName)
    	ret0, _ := ret[0].([]int64)
    	return ret0
    }
    
    // GetCPUs indicates an expected call of GetCPUs.
    func (mr *MockCPUsProviderMockRecorder) GetCPUs(podUID, containerName any) *gomock.Call {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  2. pkg/kubelet/apis/podresources/server_v1_test.go

    			mockPodsProvider.EXPECT().GetPods().Return(tc.pods).AnyTimes()
    			mockDevicesProvider.EXPECT().GetDevices(string(podUID), containerName).Return(tc.devices).AnyTimes()
    			mockCPUsProvider.EXPECT().GetCPUs(string(podUID), containerName).Return(tc.cpus).AnyTimes()
    			mockMemoryProvider.EXPECT().GetMemory(string(podUID), containerName).Return(tc.memory).AnyTimes()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 45.9K bytes
    - Viewed (0)
  3. cmd/peer-rest-client.go

    	resp, err := serverInfoRPC.Call(ctx, client.gridConn(), grid.NewMSSWith(map[string]string{peerRESTMetrics: strconv.FormatBool(metrics)}))
    	return resp.ValueOrZero(), err
    }
    
    // GetCPUs - fetch CPU information for a remote node.
    func (client *peerRESTClient) GetCPUs(ctx context.Context) (info madmin.CPUs, err error) {
    	resp, err := getCPUsHandler.Call(ctx, client.gridConn(), grid.NewMSS())
    	return resp.ValueOrZero(), err
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  4. pkg/kubelet/cm/cpumanager/cpu_assignment.go

    // NUMA nodes/sockets/cores/cpus have the same number of available CPUs, they
    // are sorted in ascending order by their id.
    func (a *cpuAccumulator) sort(ids []int, getCPUs func(ids ...int) cpuset.CPUSet) {
    	sort.Slice(ids,
    		func(i, j int) bool {
    			iCPUs := getCPUs(ids[i])
    			jCPUs := getCPUs(ids[j])
    			if iCPUs.Size() < jCPUs.Size() {
    				return true
    			}
    			if iCPUs.Size() > jCPUs.Size() {
    				return false
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jan 25 23:56:21 UTC 2024
    - 36.3K bytes
    - Viewed (0)
  5. cmd/notification.go

    		if nErr.Err != nil {
    			peersLogOnceIf(logger.SetReqInfo(ctx, reqInfo), nErr.Err, nErr.Host.String())
    		}
    	}
    }
    
    // GetCPUs - Get all CPU information.
    func (sys *NotificationSys) GetCPUs(ctx context.Context) []madmin.CPUs {
    	reply := make([]madmin.CPUs, len(sys.peerClients))
    
    	g := errgroup.WithNErrs(len(sys.peerClients))
    	for index, client := range sys.peerClients {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 44.9K bytes
    - Viewed (0)
  6. pkg/kubelet/cm/container_manager_linux.go

    }
    
    func int64Slice(in []int) []int64 {
    	out := make([]int64, len(in))
    	for i := range in {
    		out[i] = int64(in[i])
    	}
    	return out
    }
    
    func (cm *containerManagerImpl) GetCPUs(podUID, containerName string) []int64 {
    	if cm.cpuManager != nil {
    		return int64Slice(cm.cpuManager.GetExclusiveCPUs(podUID, containerName).UnsortedList())
    	}
    	return []int64{}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 21 10:18:16 UTC 2024
    - 35.1K bytes
    - Viewed (0)
Back to top