private static NodeResources averageRealResourcesOf(List<Node> nodes, NodeRepository nodeRepository) {
        NodeResources sum = new NodeResources(0, 0, 0, 0).justNumbers();
        for (Node node : nodes) {
            sum = sum.add(nodeRepository.resourcesCalculator().realResourcesOf(node, nodeRepository).justNumbers());
        }
        return nodes.get(0).allocation().get().requestedResources()
                                       .withVcpu(sum.vcpu() / nodes.size())
                                       .withMemoryGiB(sum.memoryGiB() / nodes.size())
                                       .withDiskGb(sum.diskGb() / nodes.size())
                                       .withBandwidthGbps(sum.bandwidthGbps() / nodes.size());
    }
The estimated cost of changing from the given current resources to this.
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/AllocatableResources.java