1 | package de.uka.ipd.sdq.prototype.framework; |
2 | |
3 | import de.uka.ipd.sdq.prototype.framework.utils.RunProperties; |
4 | import de.uka.ipd.sdq.sensorframework.entities.Experiment; |
5 | import de.uka.ipd.sdq.sensorframework.entities.ExperimentRun; |
6 | |
7 | public abstract class AbstractClosedScenarioThread extends AbstractScenarioThread { |
8 | |
9 | protected final Runnable usageScenario; |
10 | |
11 | public AbstractClosedScenarioThread( |
12 | Experiment exp, |
13 | ExperimentRun expRun, |
14 | String scenarioName, |
15 | RunProperties runProps) { |
16 | super(exp, expRun, scenarioName, runProps); |
17 | |
18 | this.usageScenario = getScenarioRunner(runProps); |
19 | |
20 | } |
21 | |
22 | @Override |
23 | protected void runAndMeasureUsageScenarioIteration() { |
24 | long start = System.nanoTime(); |
25 | usageScenario.run(); |
26 | takeScenarioMeasurement(start); |
27 | } |
28 | |
29 | |
30 | |
31 | |
32 | |
33 | } |