Class HostResourceStats

java.lang.Object
org.cloudbus.cloudsim.vms.ResourceStats<Host>
org.cloudbus.cloudsim.vms.HostResourceStats

public class HostResourceStats extends ResourceStats<Host>
Computes resource utilization statistics for a specific resource on a given Host.
Since:
CloudSim Plus 6.1.0
Author:
Manoel Campos da Silva Filho
  • Field Details

  • Constructor Details

    • HostResourceStats

      public HostResourceStats(Host machine, Function<Host,Double> resourceUtilizationFunction)
      Creates a HostResourceStats to collect resource utilization statistics for a Host.
      Parameters:
      machine - the Host where the statistics will be collected
      resourceUtilizationFunction - a Function that receives a Host and returns the current resource utilization for that Host
  • Method Details

    • add

      public boolean add(double time)
      Collects the current resource utilization percentage (in scale from 0 to 1) for the given time to the statistics.. The method is automatically called when the Host processing is updated.
      Overrides:
      add in class ResourceStats<Host>
      Parameters:
      time - current simulation time
      Returns:
      true if data was collected, false otherwise (meaning it's not time to collect data).