Rev | Line | |
---|
[1500] | 1 | package experiments.simpat2014.models.article; |
---|
[1469] | 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 | |
---|
[1583] | 9 | |
---|
[1469] | 10 | public class PowerLeakageEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{ |
---|
| 11 | |
---|
| 12 | public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry, |
---|
| 13 | PhysicalResource resource) { |
---|
| 14 | |
---|
[1583] | 15 | double powerLekage = 0; |
---|
[1469] | 16 | Device pl = (Device) resource; |
---|
[1583] | 17 | double tempDiff = pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() - 65; |
---|
| 18 | if(tempDiff < 0) |
---|
| 19 | return 0; |
---|
| 20 | |
---|
| 21 | powerLekage = 0.02 * tempDiff * pl.getComputingResource().getPowerInterface().getRecentPowerUsage().getValue(); |
---|
| 22 | //powerConsumption = factor * pl.getComputingResource().getPowerInterface().getRecentPowerUsage().getValue(); |
---|
[1469] | 23 | /*Device pl = (Device) resource; |
---|
| 24 | if(pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() > 90){ |
---|
| 25 | powerConsumption = powerConsumption + 15; |
---|
| 26 | }*/ |
---|
[1583] | 27 | return powerLekage; |
---|
[1469] | 28 | } |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.