Package org.cloudbus.cloudsim.hosts
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 toallocatedMips
- the total MIPS allocated from all PEs of the Host, to running VMs, at the recorded timerequestedMips
- the total MIPS requested by running VMs to all PEs of the Host at the recorded timeactive
- 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
ConstructorDescriptionHostStateHistoryEntry
(double time, double allocatedMips, double requestedMips, boolean active) Creates an instance of aHostStateHistoryEntry
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
active()
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
hashCode()
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
time()
Gets the time the data in this history entry is related to.toString()
Returns a string representation of this record class.
-
Constructor Details
-
HostStateHistoryEntry
public HostStateHistoryEntry(double time, double allocatedMips, double requestedMips, boolean active) Creates an instance of aHostStateHistoryEntry
record class.- Parameters:
time
- the value for thetime
record componentallocatedMips
- the value for theallocatedMips
record componentrequestedMips
- the value for therequestedMips
record componentactive
- the value for theactive
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
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. -
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. -
equals
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 '=='.
-