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

COVERAGE SUMMARY FOR SOURCE FILE [DemandedTimeWriteDataStrategy.java]

nameclass, %method, %block, %line, %
DemandedTimeWriteDataStrategy.java0%   (0/1)0%   (0/2)0%   (0/32)0%   (0/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DemandedTimeWriteDataStrategy0%   (0/1)0%   (0/2)0%   (0/32)0%   (0/10)
DemandedTimeWriteDataStrategy (IDAOFactory, Experiment, ExperimentRun): void 0%   (0/1)0%   (0/6)0%   (0/2)
writeData (PipeData): void 0%   (0/1)0%   (0/26)0%   (0/8)

1package de.uka.ipd.sdq.pipesandfilters.framework.recorder.sensorframework.strategies;
2 
3import javax.measure.Measure;
4import javax.measure.quantity.Duration;
5import javax.measure.unit.SI;
6 
7import de.uka.ipd.sdq.pipesandfilters.framework.PipeData;
8import de.uka.ipd.sdq.sensorframework.entities.Experiment;
9import de.uka.ipd.sdq.sensorframework.entities.ExperimentRun;
10import de.uka.ipd.sdq.sensorframework.entities.TimeSpanSensor;
11import de.uka.ipd.sdq.sensorframework.entities.dao.IDAOFactory;
12 
13public class DemandedTimeWriteDataStrategy extends AbstractWriteDataStrategy {
14 
15        public DemandedTimeWriteDataStrategy(IDAOFactory daoFactory,
16                        Experiment experiment, ExperimentRun run) {
17                super(daoFactory, experiment, run);
18        }
19 
20        @SuppressWarnings("unchecked")
21        @Override
22        public void writeData(PipeData data) {
23                Measure<Double, Duration> measurementTimeMeasure = (Measure<Double, Duration>) data
24                                .getTupleElement(0);
25                Measure<Double, Duration> demandedTimeMeasure = (Measure<Double, Duration>) data
26                                .getTupleElement(1);
27                double measurementTime = measurementTimeMeasure.doubleValue(SI.SECOND);
28                double demandedTime = demandedTimeMeasure.doubleValue(SI.SECOND);
29                run.addTimeSpanMeasurement((TimeSpanSensor)sensor, measurementTime, demandedTime);
30        }
31 
32}

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