private static Map<String, NodeMetricSnapshot> byHost(List<NodeTimeseries> allNodeTimeseries) {
        Map<String, NodeMetricSnapshot> snapshots = new HashMap<>();
        for (var nodeTimeseries : allNodeTimeseries)
            nodeTimeseries.last().ifPresent(last -> snapshots.put(nodeTimeseries.hostname(), last));
        return snapshots;
    }
Returns stats on each application, sorted by decreasing unutilized allocation measured in dollars per hour.
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeRepoStats.java