Package org.cloudbus.cloudsim.vms
Class VmCost
java.lang.Object
org.cloudbus.cloudsim.vms.VmCost
Computes the monetary ($) cost to run a given VM,
including the
total cost
and individual resource cost, namely:
the processing power, bandwidth, memory and storage cost.- Since:
- CloudSim Plus 1.0
- Author:
- raysaoliveira
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the total monetary cost ($) of the VM's allocated BW.double
Gets the total monetary cost ($) of the VM's allocated memory.double
Gets the total monetary cost ($) of processing power allocated from the PM hosting the VM, considering the VM's PEs number and total execution time.double
Gets the total monetary cost ($) of the VM's allocated storage.double
Gets the total monetary cost ($) of all resources allocated to the VM, namely the processing power, bandwidth, memory and storage.getVm()
Gets the VM for which the total monetary cost will be computed.toString()
-
Constructor Details
-
VmCost
Creates an instance to compute the monetary cost ($) to run a given VM.- Parameters:
vm
- the VM to compute its monetary cost
-
-
Method Details
-
getVm
Gets the VM for which the total monetary cost will be computed.- Returns:
-
getMemoryCost
public double getMemoryCost()Gets the total monetary cost ($) of the VM's allocated memory.- Returns:
-
getBwCost
public double getBwCost()Gets the total monetary cost ($) of the VM's allocated BW.- Returns:
-
getProcessingCost
public double getProcessingCost()Gets the total monetary cost ($) of processing power allocated from the PM hosting the VM, considering the VM's PEs number and total execution time.- Returns:
-
getStorageCost
public double getStorageCost()Gets the total monetary cost ($) of the VM's allocated storage.- Returns:
- getStorageCost
-
getTotalCost
public double getTotalCost()Gets the total monetary cost ($) of all resources allocated to the VM, namely the processing power, bandwidth, memory and storage.- Returns:
-
toString
-