Class PowerModelHostSpec
java.lang.Object
org.cloudsimplus.power.models.PowerModelHostAbstract
org.cloudsimplus.power.models.PowerModelHostSpec
- All Implemented Interfaces:
PowerModel,PowerModelHost
A power model created based on data from
SPEC power benchmark.
- Since:
- CloudSim Plus 6.0.0
- Author:
- Anton Beloglazov, Manoel Campos da Silva Filho
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intSincepowerSpecsrepresents the power consumption data according to CPU utilization, as shorter the size of such a List, less accurate is the power consumption, according to CPU utilization.Fields inherited from interface org.cloudsimplus.power.models.PowerModelHost
NULL -
Constructor Summary
ConstructorsConstructorDescriptionPowerModelHostSpec(@NonNull double[] powerSpecs) Instantiates a PowerModelHostSpec providing the power consumption data of the entity for different CPU utilization percentages. -
Method Summary
Modifier and TypeMethodDescriptionstatic PowerModelHostSpecgetInstance(String powerSpecFilePath) Creates a PowerModelHostSpec instance reading the power consumption data (in Watts) from a file with a single line, where a space separates each value.protected doublegetPowerInternal(double utilizationFraction) Methods inherited from class org.cloudsimplus.power.models.PowerModelHostAbstract
addShutDownTotals, addStartupTotals, getPower, setShutDownPower, setStartupPower, validatePowerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cloudsimplus.power.models.PowerModel
getPowerMethods inherited from interface org.cloudsimplus.power.models.PowerModelHost
getHost, getShutDownPower, getStartupPower, getTotalShutDownPower, getTotalShutDownTime, getTotalStartupPower, getTotalStartups, getTotalStartupTime, setHost
-
Field Details
-
MIN_POWER_CONSUMPTION_DATA_SIZE
public static final int MIN_POWER_CONSUMPTION_DATA_SIZESincepowerSpecsrepresents the power consumption data according to CPU utilization, as shorter the size of such a List, less accurate is the power consumption, according to CPU utilization. Check the mentioned attribute for details. Less than 2 entries don't make sense, since for any CPU utilization, the power consumption will be the same.- See Also:
-
-
Constructor Details
-
PowerModelHostSpec
public PowerModelHostSpec(@NonNull @NonNull double[] powerSpecs) Instantiates a PowerModelHostSpec providing the power consumption data of the entity for different CPU utilization percentages.- Parameters:
powerSpecs- an array where each element represents the power consumption (in Watts) of the entity for specific CPU utilization percentage. Checkfor more details about this data.invalid reference
#getPowerSpecs()- See Also:
-
-
Method Details
-
getPowerMeasurement
- Returns:
- the entity's current power usage as a
PowerMeasurementobject, which can hold additional information like static and dynamic fraction of power usage. - See Also:
-
getPowerInternal
protected double getPowerInternal(double utilizationFraction) - Specified by:
getPowerInternalin classPowerModelHostAbstract- See Also:
-
getInstance
Creates a PowerModelHostSpec instance reading the power consumption data (in Watts) from a file with a single line, where a space separates each value. The content for this file is usually obtained from https://www.spec.org.
The power-specs directory in the examples' project contains sample files that can be used here. Check
for more details about the data of this file.invalid reference
#getPowerSpecs()- Parameters:
powerSpecFilePath- path to the power spec file- Returns:
- a new PowerModelHostSpec instance
-