VmCost

public class 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.

Author:raysaoliveira

Constructors

VmCost

public VmCost(Vm vm)

Creates a VmCost object to compute the monetary cost to run a given VM.

Parameters:
  • vm – the VM to compute its monetary cost

Methods

getBwCost

public double getBwCost()

Gets the total monetary cost of the VM’s allocated BW.

getMemoryCost

public double getMemoryCost()

Gets the total monetary cost of the VM’s allocated memory.

getProcessingCost

public double getProcessingCost()

Gets the total monetary cost of processing power allocated from the PM hosting the VM.

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.

getVm

public Vm getVm()

Gets the VM for which the total monetary cost will be computed.