Skip to content
Snippets Groups Projects
Commit 58ab97c2 authored by Christian Wulf's avatar Christian Wulf
Browse files

removed TimingsReader;

added performance results
parent 9df0e151
No related branches found
No related tags found
No related merge requests found
package util;
import java.io.File;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.base.Charsets;
import com.google.common.collect.ImmutableList;
import com.google.common.io.CharSource;
import com.google.common.io.Files;
public class TimingsReader {
private final static Logger LOGGER = LoggerFactory.getLogger(TimingsReader.class);
public static void main(final String[] args) throws IOException {
String fileName = args[0];
LOGGER.trace("Reading " + fileName);
CharSource charSource = Files.asCharSource(new File(fileName), Charsets.UTF_8);
ImmutableList<String> lines = charSource.readLines();
LOGGER.trace("#lines: " + lines.size());
List<Long> durationsInNs = new LinkedList<Long>();
LOGGER.trace("Extracting timings from the last half of lines...");
int startIndex = lines.size() / 2;
for (int i = startIndex; i < lines.size(); i++) {
String line = lines.get(i);
String[] strings = line.split(";");
Long timing = new Long(strings[1]);
durationsInNs.add(timing);
}
LOGGER.trace("Calculating quantiles...");
Map<Double, Long> quintiles = StatisticsUtil.calculateQuintiles(durationsInNs);
LOGGER.info(StatisticsUtil.getQuantilesString(quintiles));
long confidenceWidth = StatisticsUtil.calculateConfidenceWidth(durationsInNs);
LOGGER.info("Confidence width: " + confidenceWidth);
}
}
...@@ -89,12 +89,20 @@ public class ChwHomeComparisonMethodcallWithPorts implements PerformanceCheckPro ...@@ -89,12 +89,20 @@ public class ChwHomeComparisonMethodcallWithPorts implements PerformanceCheckPro
// assertEquals(53, value17, 4.1); // +0 // assertEquals(53, value17, 4.1); // +0
// since 11.08.2014 (incl.) // since 11.08.2014 (incl.)
assertEquals(103, value14, 5.1); // +17 // assertEquals(103, value14, 5.1); // +17
assertEquals(47, value10, 2.1); // +21 // assertEquals(47, value10, 2.1); // +21
assertEquals(41, value11, 4.1); // -3 // assertEquals(41, value11, 4.1); // -3
assertEquals(42, value9, 2.1); // +6 // assertEquals(42, value9, 2.1); // +6
assertEquals(44, value15, 4.1); // +0 // assertEquals(44, value15, 4.1); // +0
assertEquals(53, value17, 4.1); // +0 // assertEquals(53, value17, 4.1); // +0
// since 31.08.2014 (incl.)
assertEquals(78, value14, 5.1); // -25
assertEquals(59, value10, 2.1); // +12
assertEquals(63, value11, 4.1); // +22
assertEquals(52, value9, 2.1); // +??
assertEquals(72, value15, 4.1); // +??
assertEquals(79, value17, 4.1); // +26
// below results vary too much, possibly due to the OS' scheduler // below results vary too much, possibly due to the OS' scheduler
// assertEquals(RESULT_TESTS_16, (double) test16a.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); // assertEquals(RESULT_TESTS_16, (double) test16a.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1);
......
...@@ -28,6 +28,6 @@ public class ChwHomePerformanceCheck implements PerformanceCheckProfile { ...@@ -28,6 +28,6 @@ public class ChwHomePerformanceCheck implements PerformanceCheckProfile {
System.out.println("speedupC: " + speedupC); System.out.println("speedupC: " + speedupC);
assertEquals(2, speedupB, 0.3); assertEquals(2, speedupB, 0.3);
assertEquals(4, speedupC, 0.3); assertEquals(3.5, speedupC, 0.3);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment