Revision 1593,
1.2 KB
checked in by wojtekp, 8 years ago
(diff) |
|
-
Property svn:mime-type set to
text/plain
|
Line | |
---|
1 | package experiments.e2dc2015.models.arm; |
---|
2 | |
---|
3 | import schedframe.resources.computing.profiles.energy.ResourceEvent; |
---|
4 | import schedframe.resources.devices.Device; |
---|
5 | import schedframe.resources.devices.PhysicalResource; |
---|
6 | import schedframe.scheduling.manager.tasks.JobRegistry; |
---|
7 | import example.energy.BaseEnergyEstimationPlugin; |
---|
8 | import experiments.e2dc2015.EnvironmentConditions; |
---|
9 | |
---|
10 | public class PowerLeakageEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{ |
---|
11 | |
---|
12 | public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry, |
---|
13 | PhysicalResource resource) { |
---|
14 | |
---|
15 | double powerLekage = 0; |
---|
16 | Device pl = (Device) resource; |
---|
17 | double tempDiff = pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() - EnvironmentConditions.arm_baseLeakageTemp; |
---|
18 | if(tempDiff < 0) |
---|
19 | return 0; |
---|
20 | powerLekage = EnvironmentConditions.arm_leakageFactor * tempDiff; |
---|
21 | //powerConsumption = factor * pl.getComputingResource().getPowerInterface().getRecentPowerUsage().getValue(); |
---|
22 | /*Device pl = (Device) resource; |
---|
23 | if(pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() > 90){ |
---|
24 | powerConsumption = powerConsumption + 15; |
---|
25 | }*/ |
---|
26 | return powerLekage; |
---|
27 | } |
---|
28 | |
---|
29 | |
---|
30 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.