Revision 1552,
961 bytes
checked in by wojtekp, 10 years ago
(diff) |
|
-
Property svn:mime-type set to
text/plain
|
Rev | Line | |
---|
[1290] | 1 | package example.load; |
---|
| 2 | |
---|
| 3 | import schedframe.resources.computing.ComputingResource; |
---|
[1415] | 4 | import schedframe.resources.computing.profiles.energy.ResourceEvent; |
---|
[1290] | 5 | import schedframe.resources.devices.PhysicalResource; |
---|
| 6 | import schedframe.scheduling.manager.tasks.JobRegistry; |
---|
[1396] | 7 | import simulator.stats.DCwormsAccumulator; |
---|
[1290] | 8 | |
---|
| 9 | |
---|
| 10 | public class DefaultLoadEstimationPlugin extends BaseLoadEstimationPlugin{ |
---|
| 11 | |
---|
[1415] | 12 | public double estimateUtlization(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) { |
---|
[1290] | 13 | |
---|
| 14 | ComputingResource computingResource = (ComputingResource) resource; |
---|
[1396] | 15 | DCwormsAccumulator childrenLoad = new DCwormsAccumulator(); |
---|
[1290] | 16 | for(ComputingResource compRes: computingResource.getChildren()){ |
---|
| 17 | childrenLoad.add(compRes.getLoadInterface().getRecentUtilization().getValue()); |
---|
| 18 | } |
---|
| 19 | |
---|
[1552] | 20 | //double backgroundLoad = resource.getLoadInterface().getLoadCalendar().getCurrentLoad(); |
---|
[1290] | 21 | //return childrenLoad.getMean() + backgroundLoad; |
---|
| 22 | return childrenLoad.getMean(); |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.