- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 28 for NewMilliQuantity (0.22 sec)
-
pkg/kubelet/cadvisor/util.go
) // CapacityFromMachineInfo returns the capacity of the resources from the machine info. func CapacityFromMachineInfo(info *cadvisorapi.MachineInfo) v1.ResourceList { c := v1.ResourceList{ v1.ResourceCPU: *resource.NewMilliQuantity( int64(info.NumCores*1000), resource.DecimalSI), v1.ResourceMemory: *resource.NewQuantity( int64(info.MemoryCapacity), resource.BinarySI), }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Sep 04 05:08:20 UTC 2023 - 2.8K bytes - Viewed (0) -
pkg/scheduler/util/pod_resources.go
} switch resourceName { case v1.ResourceCPU: // Override if un-set, but not if explicitly set to zero if _, found := (*requests)[v1.ResourceCPU]; !found && nonZero { return *resource.NewMilliQuantity(DefaultMilliCPURequest, resource.DecimalSI) } return requests.Cpu().DeepCopy() case v1.ResourceMemory: // Override if un-set, but not if explicitly set to zero
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 01 06:25:30 UTC 2023 - 3K bytes - Viewed (0) -
pkg/controller/podautoscaler/horizontal_test.go
Requests: v1.ResourceList{ v1.ResourceCPU: *resource.NewMilliQuantity(reportedCPURequest.MilliValue()/2, resource.DecimalSI), }, }, }, { Name: "container2", Resources: v1.ResourceRequirements{ Requests: v1.ResourceList{ v1.ResourceCPU: *resource.NewMilliQuantity(reportedCPURequest.MilliValue()/2, resource.DecimalSI), }, },
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 25 14:24:16 UTC 2024 - 199.3K bytes - Viewed (0) -
pkg/printers/internalversion/printers_test.go
Selector: metricLabelSelector, }, Target: autoscaling.MetricTarget{ Type: autoscaling.AverageValueMetricType, AverageValue: resource.NewMilliQuantity(100, resource.DecimalSI), }, }, }, }, }, Status: autoscaling.HorizontalPodAutoscalerStatus{ CurrentReplicas: 4, DesiredReplicas: 5, },
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 11 14:04:15 UTC 2024 - 218.6K bytes - Viewed (0) -
pkg/controller/podautoscaler/horizontal.go
Metric: autoscalingv2.MetricIdentifier{ Name: metricSpec.Object.Metric.Name, Selector: metricSpec.Object.Metric.Selector, }, Current: autoscalingv2.MetricValueStatus{ Value: resource.NewMilliQuantity(usageProposal, resource.DecimalSI), }, }, }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 04 18:33:12 UTC 2024 - 63.6K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/noderesources/resource_allocation.go
} if !r.useRequested { opts.NonMissingContainerRequests = v1.ResourceList{ v1.ResourceCPU: *resource.NewMilliQuantity(schedutil.DefaultMilliCPURequest, resource.DecimalSI), v1.ResourceMemory: *resource.NewQuantity(schedutil.DefaultMemoryRequest, resource.DecimalSI), } } requests := resourcehelper.PodRequests(pod, opts)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 20 14:53:43 UTC 2023 - 5.3K bytes - Viewed (0) -
pkg/kubelet/kuberuntime/kuberuntime_container_linux.go
if milliCPU > 0 { cpuLimit = resource.NewMilliQuantity(milliCPU, resource.DecimalSI) } } if runtimeStatusResources.CpuShares > 0 { milliCPU := sharesToMilliCPU(runtimeStatusResources.CpuShares) if milliCPU > 0 { cpuRequest = resource.NewMilliQuantity(milliCPU, resource.DecimalSI) } } if runtimeStatusResources.MemoryLimitInBytes > 0 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 22:40:29 UTC 2024 - 17.2K bytes - Viewed (0) -
pkg/kubelet/kuberuntime/kuberuntime_container_windows.go
if runtimeStatusResources.CpuMaximum > 0 { cpuLimitValue := runtimeStatusResources.CpuMaximum * int64(winstats.ProcessorCount()) / 10 cpuLimit = resource.NewMilliQuantity(cpuLimitValue, resource.DecimalSI) } if runtimeStatusResources.MemoryLimitInBytes > 0 { memLimit = resource.NewQuantity(runtimeStatusResources.MemoryLimitInBytes, resource.BinarySI) }
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_test.go
State: kubecontainer.ContainerStateRunning, CreatedAt: time.Unix(0, createdAt), StartedAt: time.Unix(0, startedAt), Resources: &kubecontainer.ContainerResources{ CPULimit: resource.NewMilliQuantity(250, resource.DecimalSI), MemoryLimit: resource.NewQuantity(524288000, resource.BinarySI), }, }, skipOnWindows: true, }, "container reporting cpu only": {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 22:40:29 UTC 2024 - 28K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
i: int64Amount{value: value}, Format: format, } } // NewMilliQuantity returns a new Quantity representing the given // value * 1/1000 in the given format. Note that BinarySI formatting // will round fractional values, and will be changed to DecimalSI for // values x where (-1 < x < 1) && (x != 0). func NewMilliQuantity(value int64, format Format) *Quantity { return &Quantity{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:10 UTC 2024 - 23.8K bytes - Viewed (0)