use of com.yahoo.vespa.hosted.controller.application.ClusterCost in project vespa by vespa-engine.
the class ApplicationApiHandler method toSlime.
public static void toSlime(DeploymentCost deploymentCost, Cursor object) {
object.setLong("tco", (long) deploymentCost.getTco());
object.setLong("waste", (long) deploymentCost.getWaste());
object.setDouble("utilization", deploymentCost.getUtilization());
Cursor clustersObject = object.setObject("cluster");
for (Map.Entry<String, ClusterCost> clusterEntry : deploymentCost.getCluster().entrySet()) toSlime(clusterEntry.getValue(), clustersObject.setObject(clusterEntry.getKey()));
}
Aggregations