EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.scheduler.priority.update]

COVERAGE SUMMARY FOR SOURCE FILE [SetToBaseUpdate.java]

nameclass, %method, %block, %line, %
SetToBaseUpdate.java0%   (0/1)0%   (0/3)0%   (0/40)0%   (0/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SetToBaseUpdate0%   (0/1)0%   (0/3)0%   (0/40)0%   (0/13)
SetToBaseUpdate (int): void 0%   (0/1)0%   (0/15)0%   (0/6)
cloneFor (ProcessWithPriority): SetToBaseUpdate 0%   (0/1)0%   (0/6)0%   (0/1)
update (ProcessWithPriority): boolean 0%   (0/1)0%   (0/19)0%   (0/6)

1package de.uka.ipd.sdq.scheduler.priority.update;
2 
3import de.uka.ipd.sdq.scheduler.priority.IPriorityUpdateStrategy;
4import de.uka.ipd.sdq.scheduler.processes.impl.ProcessWithPriority;
5 
6 
7public class SetToBaseUpdate implements IPriorityUpdateStrategy {
8 
9        int currentTimeslices = 1;
10        int timeslices = 1;
11        
12        public SetToBaseUpdate(int timeslices) {
13                this.timeslices = timeslices;
14                this.currentTimeslices = timeslices;
15        }
16 
17        public boolean update(ProcessWithPriority process) {
18                if (process.getTimeslice().isFinished()){
19                        currentTimeslices --;
20                        if (currentTimeslices <= 0){
21                                process.resetDynamicPriority();
22                                return false;
23                        }
24                }
25                return true;
26        }
27        
28        public SetToBaseUpdate cloneFor(ProcessWithPriority process)  {
29                return new SetToBaseUpdate(timeslices);
30        }
31 
32}

[all classes][de.uka.ipd.sdq.scheduler.priority.update]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov