コード例 #1
0
  public float getPIdle(ServerType server) {

    double ue = getUsageEffectiveness(server);

    ServerStatusType status = server.getStatus();
    server.setStatus(ServerStatusType.ON); // set the server status to ON to avoid a null power
    float powerIdle = (float) (powerCalculation.computePowerIdle(server, powerCalculator) * ue);
    server.setStatus(status);

    return powerIdle;
  }
コード例 #2
0
  public float getPperVM(ServerType server) {

    double ue = getUsageEffectiveness(server);

    VMType vm = currentVMType.getVMType().get(0);
    ServerStatusType status = server.getStatus();
    server.setStatus(ServerStatusType.ON); // set the server status to ON to avoid a null power
    float PperVM = (float) (powerCalculation.computePowerForVM(server, vm, powerCalculator) * ue);
    server.setStatus(status);

    return PperVM;
  }