Class VmUtilizationHistory

java.lang.Object
org.cloudbus.cloudsim.vms.VmUtilizationHistory
All Implemented Interfaces:
UtilizationHistory

public class VmUtilizationHistory
extends java.lang.Object
implements UtilizationHistory
Stores resource utilization data for a specific Vm.
Since:
CloudSim Plus 1.4
Author:
Anton Beloglazov, Manoel Campos da Silva Filho
  • Field Summary

    Fields inherited from interface org.cloudbus.cloudsim.vms.UtilizationHistory

    NULL
  • Constructor Summary

    Constructors 
    Constructor Description
    VmUtilizationHistory​(Vm vm)
    Instantiates the class to store resource utilization history for a specific Vm.
    VmUtilizationHistory​(Vm vm, boolean enabled)
    Instantiates the class to store resource utilization history for a specific Vm.
  • Method Summary

    Modifier and Type Method Description
    void addUtilizationHistory​(double time)
    Adds a CPU utilization percentage history value related to the current simulation time, to the beginning of the History List.
    void disable()
    Disables the history to avoid utilization data to be added to it.
    void enable()
    Enables the history so that utilization data can be added to it.
    java.util.SortedMap<java.lang.Double,​java.lang.Double> getHistory()
    Gets a read-only CPU utilization percentage history map where each key is the time the utilization was collected and each value is the utilization percentage (between [0 and 1]).
    double getHostCpuUtilization​(double time)
    Computes the relative percentage of the CPU the VM is using from the Host's total MIPS Capacity.
    int getMaxHistoryEntries()
    Gets the maximum number of entries to store in the history.
    double getUtilizationMad()
    Gets the utilization Median Absolute Deviation (MAD) in MIPS.
    double getUtilizationMean()
    Gets the utilization mean in MIPS.
    double getUtilizationVariance()
    Gets the utilization variance in MIPS.
    Vm getVm()  
    boolean isEnabled()
    Checks if the object is enabled to add data to the history.
    double powerConsumption​(double time)
    Computes the amount of power the VM is using, relative to the total Host's power consumption (in watt-sec).
    void setMaxHistoryEntries​(int maxHistoryEntries)
    Sets the maximum number of entries to store in the history.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VmUtilizationHistory

      public VmUtilizationHistory​(Vm vm, boolean enabled)
      Instantiates the class to store resource utilization history for a specific Vm.
      Parameters:
      vm - the vm to instantiates the object to store utilization history
      enabled - true if the history must be enabled by default, enabling usage history to be collected and stored; false if it must be disabled to avoid storing any history, in order to reduce memory usage
    • VmUtilizationHistory

      public VmUtilizationHistory​(Vm vm)
      Instantiates the class to store resource utilization history for a specific Vm.
      Parameters:
      vm - the vm to instantiates the object to store utilization history
  • Method Details