(a, b)
| 55 | const preferLowAlphanumericNames = (a, b) => a.name.localeCompare(b.name); |
| 56 | |
| 57 | const preferHighPerformanceImpact = (a, b) => { |
| 58 | const hasCpu = typeof a.cpu === 'number' && typeof b.cpu === 'number'; |
| 59 | const hasMemory = typeof a.memory === 'number' && typeof b.memory === 'number'; |
| 60 | |
| 61 | if (hasCpu && hasMemory) { |
| 62 | return numberSortDescending(a.cpu + a.memory, b.cpu + b.memory); |
| 63 | } |
| 64 | |
| 65 | if (hasCpu) { |
| 66 | return numberSortDescending(a.cpu, b.cpu); |
| 67 | } |
| 68 | |
| 69 | if (hasMemory) { |
| 70 | return numberSortDescending(a.memory, b.memory); |
| 71 | } |
| 72 | |
| 73 | return 0; |
| 74 | }; |
| 75 | |
| 76 | const preferHeurisicallyInterestingProcesses = (a, b) => { |
| 77 | let result; |
no outgoing calls
no test coverage detected