Search in sources :

Example 1 with ClusterCost

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()));
}
Also used : ClusterCost(com.yahoo.vespa.hosted.controller.application.ClusterCost) Cursor(com.yahoo.slime.Cursor) Map(java.util.Map)

Aggregations

Cursor (com.yahoo.slime.Cursor)1 ClusterCost (com.yahoo.vespa.hosted.controller.application.ClusterCost)1 Map (java.util.Map)1