EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.measurement.strategies.activeresource.cpu]

COVERAGE SUMMARY FOR SOURCE FILE [CountNumbersDemand.java]

nameclass, %method, %block, %line, %
CountNumbersDemand.java0%   (0/1)0%   (0/6)0%   (0/45)0%   (0/12)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CountNumbersDemand0%   (0/1)0%   (0/6)0%   (0/45)0%   (0/12)
CountNumbersDemand (): void 0%   (0/1)0%   (0/8)0%   (0/2)
cleanup (): void 0%   (0/1)0%   (0/1)0%   (0/1)
countNumbers (double): void 0%   (0/1)0%   (0/27)0%   (0/5)
getName (): String 0%   (0/1)0%   (0/2)0%   (0/1)
getStrategysResource (): ResourceTypeEnum 0%   (0/1)0%   (0/2)0%   (0/1)
run (long): void 0%   (0/1)0%   (0/5)0%   (0/2)

1package de.uka.ipd.sdq.measurement.strategies.activeresource.cpu;
2 
3import de.uka.ipd.sdq.measurement.strategies.activeresource.AbstractDemandStrategy;
4import de.uka.ipd.sdq.measurement.strategies.activeresource.ResourceTypeEnum;
5 
6 
7public class CountNumbersDemand extends AbstractDemandStrategy {
8        
9        // needed to stop the JIT compiler from removing the code in execute
10        private long k;
11        
12        public CountNumbersDemand() {
13                super(-3,-1,2,10000,5000);
14        }
15        
16        private void countNumbers(double countTo) {
17                for (long j=0; j<countTo; j++){
18                        if (k>100000){
19                                k=0;
20                        }
21                        k+=j;
22                }
23        }
24 
25        @Override
26        public void run(long initial) {
27                countNumbers(initial);
28        }
29 
30        @Override
31        public ResourceTypeEnum getStrategysResource() {
32                return ResourceTypeEnum.CPU;
33        }
34 
35        @Override
36        public String getName() {
37                return "CountNumbers";
38        }
39        
40        @Override
41        public void cleanup() {
42                // Do nothing.
43        }
44}

[all classes][de.uka.ipd.sdq.measurement.strategies.activeresource.cpu]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov