Class TaskUsage

java.lang.Object
org.cloudsimplus.traces.google.TaskUsage

public final class TaskUsage
extends Object
A data class to store the attributes representing the resource usage of a Cloudlet, according to the data read from a line inside a "task usage" trace file. Instance of this class are created by the GoogleTaskUsageTraceReader and provided to the user's simulation.
Since:
CloudSim Plus 4.0.0
Author:
Manoel Campos da Silva Filho
  • Constructor Summary

    Constructors
    Constructor Description
    TaskUsage()  
  • Method Summary

    Modifier and Type Method Description
    double getAssignedMemoryUsage()
    Gets the assigned memory usage, i.e., memory usage based on the memory actually assigned (but not necessarily used) to the container where the task was running inside the Google Cluster.
    double getCanonicalMemoryUsage()
    Gets the canonical memory usage, i.e., the number of user accessible pages, including page cache but excluding some pages marked as stale.
    double getEndTime()
    Gets the end time​ of the measurement period (converted to seconds).
    long getJobId()
    Gets the id of the job this task belongs to.
    long getMachineId()
    Gets the machineID that indicates the machine onto which the task was scheduled.
    double getMaximumCpuUsage()
    Gets the maximum CPU usage observed over the measurement interval.
    double getMaximumDiskIoTime()
    Gets the maximum disk IO time observed over the measurement interval.
    double getMaximumMemoryUsage()
    Gets the maximum memory usage, i.e., the maximum value of the canonical memory usage measurement observed over the measurement interval.
    double getMeanCpuUsageRate()
    Gets the mean CPU usage rate (in percentage from 0 to 1).
    double getMeanDiskIoTime()
    Gets the mean disk I/O time.
    double getMeanLocalDiskSpaceUsed()
    Gets the mean local disk space used.
    double getStartTime()
    Gets the start time​ of the measurement period (converted to seconds).
    long getTaskIndex()
    Gets the task index within the job.
    long getUniqueTaskId()
    An unique ID to be used to identify Cloudlets.
    protected TaskUsage setStartTime​(double startTime)  

    Methods inherited from class java.lang.Object

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

    • TaskUsage

      public TaskUsage()
  • Method Details

    • getStartTime

      public double getStartTime()
      Gets the start time​ of the measurement period (converted to seconds).
      Returns:
      See Also:
      GoogleTaskUsageTraceReader.FieldIndex.START_TIME
    • setStartTime

      protected TaskUsage setStartTime​(double startTime)
    • getEndTime

      public double getEndTime()
      Gets the end time​ of the measurement period (converted to seconds).
      Returns:
      See Also:
      GoogleTaskUsageTraceReader.FieldIndex.END_TIME
    • getMeanCpuUsageRate

      public double getMeanCpuUsageRate()
      Gets the mean CPU usage rate (in percentage from 0 to 1).
      Returns:
      See Also:
      GoogleTaskUsageTraceReader.FieldIndex.MEAN_CPU_USAGE_RATE
    • getCanonicalMemoryUsage

      public double getCanonicalMemoryUsage()
      Gets the canonical memory usage, i.e., the number of user accessible pages, including page cache but excluding some pages marked as stale.
      Returns:
      See Also:
      GoogleTaskUsageTraceReader.FieldIndex.CANONICAL_MEMORY_USAGE
    • getAssignedMemoryUsage

      public double getAssignedMemoryUsage()
      Gets the assigned memory usage, i.e., memory usage based on the memory actually assigned (but not necessarily used) to the container where the task was running inside the Google Cluster.
      Returns:
      See Also:
      GoogleTaskUsageTraceReader.FieldIndex.ASSIGNED_MEMORY_USAGE
    • getMaximumMemoryUsage

      public double getMaximumMemoryUsage()
      Gets the maximum memory usage, i.e., the maximum value of the canonical memory usage measurement observed over the measurement interval. This value is not available for some tasks.
      Returns:
      See Also:
      GoogleTaskUsageTraceReader.FieldIndex.MAXIMUM_MEMORY_USAGE
    • getMeanDiskIoTime

      public double getMeanDiskIoTime()
      Gets the mean disk I/O time.
      Returns:
      See Also:
      GoogleTaskUsageTraceReader.FieldIndex.MEAN_DISK_IO_TIME
    • getMeanLocalDiskSpaceUsed

      public double getMeanLocalDiskSpaceUsed()
      Gets the mean local disk space used. Represents runtime local disk capacity usage. Disk usage required for binaries and other read-only, pre-staged runtime files is ​not​included. Additionally, most disk space used by distributed, persistent storage (e.g. GFS, Colossus) is not accounted for in this trace.
      Returns:
      See Also:
      GoogleTaskUsageTraceReader.FieldIndex.MEAN_LOCAL_DISK_SPACE_USED
    • getMaximumCpuUsage

      public double getMaximumCpuUsage()
      Gets the maximum CPU usage observed over the measurement interval.
      Returns:
      See Also:
      GoogleTaskUsageTraceReader.FieldIndex.MAXIMUM_CPU_USAGE
    • getMaximumDiskIoTime

      public double getMaximumDiskIoTime()
      Gets the maximum disk IO time observed over the measurement interval.
      Returns:
      See Also:
      GoogleTaskUsageTraceReader.FieldIndex.MAXIMUM_DISK_IO_TIME
    • getJobId

      public long getJobId()
      Gets the id of the job this task belongs to.
      Returns:
    • getTaskIndex

      public long getTaskIndex()
      Gets the task index within the job.
      Returns:
    • getUniqueTaskId

      public long getUniqueTaskId()
      An unique ID to be used to identify Cloudlets. The ID is composed of the Job ID, concatenated with the Task Index.
      Returns:
    • getMachineId

      public long getMachineId()
      Gets the machineID that indicates the machine onto which the task was scheduled. If the field is empty, -1 is returned instead.
      Returns: