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

COVERAGE SUMMARY FOR SOURCE FILE [AbstractOpenScenarioThread.java]

nameclass, %method, %block, %line, %
AbstractOpenScenarioThread.java0%   (0/2)0%   (0/6)0%   (0/111)0%   (0/23)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AbstractOpenScenarioThread0%   (0/1)0%   (0/4)0%   (0/42)0%   (0/13)
AbstractOpenScenarioThread (Experiment, ExperimentRun, String, RunProperties,... 0%   (0/1)0%   (0/13)0%   (0/4)
access$0 (AbstractOpenScenarioThread): String 0%   (0/1)0%   (0/3)0%   (0/1)
access$1 (AbstractOpenScenarioThread): RunProperties 0%   (0/1)0%   (0/3)0%   (0/1)
runAndMeasureUsageScenarioIteration (): void 0%   (0/1)0%   (0/23)0%   (0/7)
     
class AbstractOpenScenarioThread$10%   (0/1)0%   (0/2)0%   (0/69)0%   (0/11)
AbstractOpenScenarioThread$1 (AbstractOpenScenarioThread): void 0%   (0/1)0%   (0/6)0%   (0/2)
run (): void 0%   (0/1)0%   (0/63)0%   (0/9)

1package de.uka.ipd.sdq.prototype.framework;
2 
3import de.uka.ipd.sdq.prototype.framework.utils.RunProperties;
4import de.uka.ipd.sdq.sensorframework.entities.Experiment;
5import de.uka.ipd.sdq.sensorframework.entities.ExperimentRun;
6import de.uka.ipd.sdq.simucomframework.variables.StackContext;
7 
8public abstract class AbstractOpenScenarioThread extends AbstractScenarioThread {
9 
10        private RunProperties runProps;
11        private String interarrivalTime;
12 
13        public AbstractOpenScenarioThread(Experiment exp,
14                        ExperimentRun expRun,
15                        String scenarioName, RunProperties runProps, 
16                        String interarrivalTimeInSec) {
17                super(exp, expRun, scenarioName, runProps);
18                this.runProps = runProps;
19                this.interarrivalTime = interarrivalTimeInSec;
20 
21        }
22 
23        @Override
24        protected void runAndMeasureUsageScenarioIteration() {
25 
26                new Thread() {
27                        public void run() {
28                                if (logger.isDebugEnabled()) {
29                                        logger.debug("New Thread: Open Scenario (" + scenarioName + "), interarrival time: " + interarrivalTime);
30                                }
31                                
32                                logger.debug("Starting my scenario");
33                                long start = System.nanoTime();
34                                logger.debug("New Thread: Open Scenario (" + scenarioName + "), inner thread");
35 
36                                getScenarioRunner(runProps).run();
37                                
38                                takeScenarioMeasurement(start);
39                                logger.debug("Finished my scenario");
40 
41                        }
42                }.start();
43 
44                try {
45                        
46                        Double interarrivalTime = StackContext.evaluateStatic(this.interarrivalTime, Double.class) * 1000.0;
47                        Thread.sleep(interarrivalTime.longValue());
48                        
49                } catch (InterruptedException e) {
50                        e.printStackTrace();
51                }
52                
53        }
54 
55}
56 

[all classes][de.uka.ipd.sdq.prototype.framework]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov