summaryrefslogtreecommitdiffstats
path: root/node-repository
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@verizonmedia.com>2020-03-05 13:59:28 +0100
committerJon Bratseth <bratseth@verizonmedia.com>2020-03-05 13:59:28 +0100
commita5e3c6f4b5db28bc10105188fe7c248b16e91586 (patch)
tree211679e524d990bdd705b018b5b29e62e19a5bcc /node-repository
parent448f417da4df3e674c40915cb3d5418bf110d92c (diff)
Simplify
Diffstat (limited to 'node-repository')
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Autoscaler.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Autoscaler.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Autoscaler.java
index 4b186bb1881..c0cf9fdc83a 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Autoscaler.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Autoscaler.java
@@ -90,7 +90,7 @@ public class Autoscaler {
if (closeToIdeal(Resource.cpu, cpuLoad.get()) &&
closeToIdeal(Resource.memory, memoryLoad.get()) &&
closeToIdeal(Resource.disk, diskLoad.get()) &&
- similarCost(bestAllocation.get().cost(), currentAllocation.advertisedResources().nodes() * costOf(currentAllocation.advertisedResources().nodeResources()))) {
+ similarCost(bestAllocation.get().cost(), currentAllocation.cost())) {
log.fine("Autoscaling " + applicationId + " " + cluster + ": Resources are almost ideal and price difference is small");
return Optional.empty(); // Avoid small, unnecessary changes
}