private boolean shouldUpdateSuggestion(List<Autoscaling> currentSuggestions, List<Autoscaling> newSuggestions) {
        // Only compare previous best suggestion with current best suggestion
        var currentSuggestion = currentSuggestions.stream().findFirst();
        var newSuggestion = newSuggestions.stream().findFirst();

        if (currentSuggestion.isEmpty()) return true;
        if (newSuggestion.isEmpty()) return false;

        return newSuggestion.get().status() != Autoscaling.Status.waiting
               && (currentSuggestion.get().resources().isEmpty()
               || currentSuggestion.get().at().isBefore(nodeRepository().clock().instant().minus(Duration.ofDays(7)))
               || (newSuggestion.get().resources().isPresent() && isHigher(newSuggestion.get().resources().get(), currentSuggestion.get().resources().get())));
    }
Maintainer computing scaling suggestions for all clusters

@author bratseth
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/ScalingSuggestionsMaintainer.java