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

COVERAGE SUMMARY FOR SOURCE FILE [TestMCRWarmUpFilter.java]

nameclass, %method, %block, %line, %
TestMCRWarmUpFilter.java0%   (0/1)0%   (0/2)0%   (0/83)0%   (0/19)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TestMCRWarmUpFilter0%   (0/1)0%   (0/2)0%   (0/83)0%   (0/19)
TestMCRWarmUpFilter (): void 0%   (0/1)0%   (0/3)0%   (0/1)
testWarmUpFilter (): void 0%   (0/1)0%   (0/80)0%   (0/18)

1package de.uka.ipd.sdq.statistics.test;
2 
3import java.io.File;
4import java.util.ArrayList;
5import java.util.Collection;
6import java.util.List;
7 
8import junit.framework.TestCase;
9import de.uka.ipd.sdq.sensorframework.dao.file.FileDAOFactory;
10import de.uka.ipd.sdq.sensorframework.entities.Measurement;
11import de.uka.ipd.sdq.sensorframework.entities.TimeSpanMeasurement;
12import de.uka.ipd.sdq.sensorframework.entities.dao.IDAOFactory;
13import de.uka.ipd.sdq.statistics.MCRWarmUpFilter;
14 
15/**
16 * Tests the {@link MCRWarmUpFilter}. This test case is intended for manual
17 * testing only. For evaluating the outcome the date series needs to be plotted
18 * (e.g. as time series) and compared manually.
19 * 
20 * @author Philipp Merkle
21 * 
22 */
23public class TestMCRWarmUpFilter extends TestCase {
24 
25        public void testWarmUpFilter() {
26                // Adjust path to data store here!
27                String dataStorePath = "D:\\Studium\\Master\\HiWi IPD\\runtime-150909\\brs\\Data4";
28 
29                File dataStoreFolder = new File(dataStorePath);
30                if (dataStoreFolder.exists()) {
31 
32                        IDAOFactory factory = new FileDAOFactory(dataStorePath);
33                        Collection<Measurement> measurements = TestUtils.loadMeasurements(
34                                        factory, 0, 0, 24);
35 
36                        List<Double> samples = new ArrayList<Double>(measurements.size());
37                        for (Measurement m : measurements) {
38                                TimeSpanMeasurement tsm = (TimeSpanMeasurement) m;
39                                samples.add(tsm.getTimeSpan());
40                        }
41 
42                        MCRWarmUpFilter filter = new MCRWarmUpFilter();
43                        filter.filter(samples);
44                        System.out.println("Warm-Up Peroid: Up to measurement "
45                                        + filter.getTruncationIndex());
46 
47                        factory.finalizeAndClose();
48                } else {
49                        System.err.println("Could not find data store path \""
50                                        + dataStorePath + "\"");
51                }
52        }
53 
54}

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