Ignore:
Timestamp:
07/15/14 16:26:31 (11 years ago)
Author:
wojtekp
Message:
 
Location:
DCWoRMS/branches/coolemall/src/example/load
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/branches/coolemall/src/example/load/DefaultLoadEstimationPlugin.java

    r1396 r1415  
    22 
    33import schedframe.resources.computing.ComputingResource; 
    4 import schedframe.resources.computing.profiles.energy.EnergyEvent; 
     4import schedframe.resources.computing.profiles.energy.ResourceEvent; 
    55import schedframe.resources.devices.PhysicalResource; 
    66import schedframe.scheduling.manager.tasks.JobRegistry; 
     
    1010public class DefaultLoadEstimationPlugin extends BaseLoadEstimationPlugin{ 
    1111 
    12         public double estimateUtlization(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource) { 
     12        public double estimateUtlization(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) { 
    1313 
    1414                ComputingResource computingResource = (ComputingResource) resource; 
  • DCWoRMS/branches/coolemall/src/example/load/ProcessorLoadEstimationPlugin.java

    r1396 r1415  
    22 
    33import schedframe.resources.computing.Processor; 
    4 import schedframe.resources.computing.profiles.energy.EnergyEvent; 
     4import schedframe.resources.computing.profiles.energy.ResourceEvent; 
    55import schedframe.resources.devices.PhysicalResource; 
    66import schedframe.scheduling.manager.tasks.JobRegistry; 
    77import schedframe.scheduling.manager.tasks.JobRegistryImpl; 
    8 import schedframe.scheduling.tasks.phases.PhaseBehaviour; 
     8import schedframe.scheduling.tasks.phases.PhaseSystemLoad; 
    99import dcworms.schedframe.scheduling.ExecTask; 
    1010 
    1111public class ProcessorLoadEstimationPlugin extends BaseLoadEstimationPlugin{ 
    1212 
    13         public double estimateUtlization(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource) { 
     13        public double estimateUtlization(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) { 
    1414                Processor proc = (Processor) resource; 
    1515                double sumCoresLoad = 0; 
     
    2626                        double cpuUsage = 1 / nrOfThreadsOnCpu; 
    2727 
    28                         for(PhaseBehaviour pb: task.getExecutionProfile().getCurrentResourceConsumption().getBehaviourList()){ 
     28                        for(PhaseSystemLoad pb: task.getExecutionProfile().getCurrentResourceConsumption().getSystemLoad()){ 
    2929                                if(pb.getResouceName().equals("PM_CPU_Usage")){ 
    3030                                        cpuUsage = pb.getUtilization(); 
Note: See TracChangeset for help on using the changeset viewer.