Class HostStateHistoryEntry

java.lang.Object
org.cloudbus.cloudsim.hosts.HostStateHistoryEntry

public final class HostStateHistoryEntry
extends Object
Keeps historic CPU utilization data about a host.
Since:
CloudSim Toolkit 2.1.2
Author:
Anton Beloglazov
  • Constructor Summary

    Constructors
    Constructor Description
    HostStateHistoryEntry​(double time, double allocatedMips, double requestedMips, boolean active)
    Instantiates a host state history entry.
  • Method Summary

    Modifier and Type Method Description
    double getAllocatedMips()
    Gets the total MIPS allocated from all PEs of the Host, to running VMs, at the recorded time.
    double getPercentUsage()
    Gets the percentage (in scale from 0 to 1) of allocated MIPS from the total requested.
    double getRequestedMips()
    Gets the total MIPS requested by running VMs to all PEs of the Host at the recorded time.
    double getTime()
    Gets the time the data in this history entry is related to.
    boolean isActive()
    Checks if the Host is/was active at the recorded time.
    String toString()  

    Methods inherited from class java.lang.Object

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

    • HostStateHistoryEntry

      public HostStateHistoryEntry​(double time, double allocatedMips, double requestedMips, boolean active)
      Instantiates a host state history entry.
      Parameters:
      time - the time the data in this history entry is related to
      allocatedMips - the total MIPS allocated from all PEs of the Host, to running VMs, at the recorded time
      requestedMips - the total MIPS requested by running VMs to all PEs of the Host at the recorded time
      active - if the Host is active at the given time
  • Method Details

    • getTime

      public double getTime()
      Gets the time the data in this history entry is related to.
      Returns:
    • getAllocatedMips

      public double getAllocatedMips()
      Gets the total MIPS allocated from all PEs of the Host, to running VMs, at the recorded time.
      Returns:
      the allocated mips
    • getRequestedMips

      public double getRequestedMips()
      Gets the total MIPS requested by running VMs to all PEs of the Host at the recorded time.
      Returns:
      the requested mips
    • getPercentUsage

      public double getPercentUsage()
      Gets the percentage (in scale from 0 to 1) of allocated MIPS from the total requested.
      Returns:
    • isActive

      public boolean isActive()
      Checks if the Host is/was active at the recorded time.
      Returns:
      true if is active, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object