private void updateSkewMetric(NodeList allNodes) {
        HostCapacity capacity = new HostCapacity(allNodes, nodeRepository().resourcesCalculator());
        double totalSkew = 0;
        int hostCount = 0;
        for (Node host : allNodes.nodeType(NodeType.host).state(Node.State.active)) {
            hostCount++;
            totalSkew += Node.skew(host.flavor().resources(), capacity.unusedCapacityOf(host));
        }
        metric.set(ConfigServerMetrics.HOSTED_VESPA_DOCKER_SKEW.baseName(),totalSkew/hostCount, null);
    }
We do this here rather than in MetricsReporter because it is expensive and frequent updates are unnecessary
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/Rebalancer.java