Package org.cloudbus.cloudsim.core
Interface ResourceStatsComputer<T extends AbstractResourceStats>
- Type Parameters:
T
- the class in which resource utilization will be computed and stored
- All Known Implementing Classes:
HostSimple
,NetworkHost
,NetworkVm
,VmGroup
,VmSimple
public interface ResourceStatsComputer<T extends AbstractResourceStats>
An interface that enables machines (VMs or Hosts) to enable the computation of statistics for its resource utilization.
Since that computation may be computationally complex and increase memory consumption,
you have to explicitly enable that by calling
enableUtilizationStats()
.- Since:
- CloudSim Plus 6.1.0
- Author:
- Manoel Camops da Silva Filho
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Enables the data collection and computation of utilization statistics.Gets machine's CPU utilization percentage statistics (between [0 and 1]).
-
Method Details
-
getCpuUtilizationStats
T getCpuUtilizationStats()Gets machine's CPU utilization percentage statistics (between [0 and 1]).WARNING: You need to enable the data collection and computation of statistics by calling
enableUtilizationStats()
.The time interval in which utilization is collected is defined by the
Datacenter.getSchedulingInterval()
.- Returns:
-
enableUtilizationStats
void enableUtilizationStats()Enables the data collection and computation of utilization statistics.- See Also:
-