Record Class HostStateHistoryEntry

java.lang.Object
java.lang.Record
org.cloudbus.cloudsim.hosts.HostStateHistoryEntry
Record Components:
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

public record HostStateHistoryEntry(double time, double allocatedMips, double requestedMips, boolean active) extends Record
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)
    Creates an instance of a HostStateHistoryEntry record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks if the Host is/was active at the recorded time.
    double
    Gets the total MIPS allocated from all PEs of the Host, to running VMs, at the recorded time.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    double
    Gets the percentage (in scale from 0 to 1) of allocated MIPS from the total requested.
    double
    Gets the total MIPS requested by running VMs to all PEs of the Host at the recorded time.
    double
    Gets the time the data in this history entry is related to.
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • HostStateHistoryEntry

      public HostStateHistoryEntry(double time, double allocatedMips, double requestedMips, boolean active)
      Creates an instance of a HostStateHistoryEntry record class.
      Parameters:
      time - the value for the time record component
      allocatedMips - the value for the allocatedMips record component
      requestedMips - the value for the requestedMips record component
      active - the value for the active record component
  • Method Details

    • time

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

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

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

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

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

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.