MCPcopy
hub / github.com/cortexlabs/cortex / PodComputesEqual

Function PodComputesEqual

pkg/lib/k8s/pod.go:422–426  ·  view source on GitHub ↗
(podSpec1, podSpec2 *kcore.PodSpec)

Source from the content-addressed store, hash-verified

420}
421
422func PodComputesEqual(podSpec1, podSpec2 *kcore.PodSpec) bool {
423 cpu1, mem1, gpu1, inf1 := TotalPodCompute(podSpec1)
424 cpu2, mem2, gpu2, inf2 := TotalPodCompute(podSpec2)
425 return cpu1.Equal(cpu2) && mem1.Equal(mem2) && gpu1 == gpu2 && inf1 == inf2
426}
427
428func TotalPodCompute(podSpec *kcore.PodSpec) (Quantity, Quantity, int64, int64) {
429 totalCPU := Quantity{}

Callers

nothing calls this directly

Calls 2

TotalPodComputeFunction · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected