Package org.cloudbus.cloudsim.vms
Class HostResourceStats
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 Summary
-
Constructor Summary
ConstructorDescriptionHostResourceStats
(Host machine, Function<Host, Double> resourceUtilizationFunction) Creates a HostResourceStats to collect resource utilization statistics for a Host. -
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(double time) Collects the current resource utilization percentage (in scale from 0 to 1) for the given time to the statistics.Methods inherited from class org.cloudbus.cloudsim.vms.ResourceStats
count, getMachine, getMax, getMean, getMin, getPreviousTime, getStandardDeviation, getVariance, isElapsedTimeSmall, isEmpty, isNotEntireSecondElapsed, isNotTimeToAddHistory
-
Field Details
-
NULL
-
-
Constructor Details
-
HostResourceStats
Creates a HostResourceStats to collect resource utilization statistics for a Host.- Parameters:
machine
- the Host where the statistics will be collectedresourceUtilizationFunction
- aFunction
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 classResourceStats<Host>
- Parameters:
time
- current simulation time- Returns:
- true if data was collected, false otherwise (meaning it's not time to collect data).
-