From 58ab97c254bdbc8f2d905bf72149f13a39f24daf Mon Sep 17 00:00:00 2001 From: Christian Wulf <chw@informatik.uni-kiel.de> Date: Sun, 31 Aug 2014 19:29:48 +0200 Subject: [PATCH] removed TimingsReader; added performance results --- src/main/java/util/TimingsReader.java | 48 ------------------- .../ChwHomeComparisonMethodcallWithPorts.java | 20 +++++--- .../experiment16/ChwHomePerformanceCheck.java | 2 +- 3 files changed, 15 insertions(+), 55 deletions(-) delete mode 100644 src/main/java/util/TimingsReader.java diff --git a/src/main/java/util/TimingsReader.java b/src/main/java/util/TimingsReader.java deleted file mode 100644 index 5d907fb2..00000000 --- a/src/main/java/util/TimingsReader.java +++ /dev/null @@ -1,48 +0,0 @@ -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); - } -} diff --git a/src/test/java/teetime/variant/methodcallWithPorts/examples/ChwHomeComparisonMethodcallWithPorts.java b/src/test/java/teetime/variant/methodcallWithPorts/examples/ChwHomeComparisonMethodcallWithPorts.java index 28b2bb3f..99d36d53 100644 --- a/src/test/java/teetime/variant/methodcallWithPorts/examples/ChwHomeComparisonMethodcallWithPorts.java +++ b/src/test/java/teetime/variant/methodcallWithPorts/examples/ChwHomeComparisonMethodcallWithPorts.java @@ -89,12 +89,20 @@ public class ChwHomeComparisonMethodcallWithPorts implements PerformanceCheckPro // assertEquals(53, value17, 4.1); // +0 // since 11.08.2014 (incl.) - assertEquals(103, value14, 5.1); // +17 - assertEquals(47, value10, 2.1); // +21 - assertEquals(41, value11, 4.1); // -3 - assertEquals(42, value9, 2.1); // +6 - assertEquals(44, value15, 4.1); // +0 - assertEquals(53, value17, 4.1); // +0 + // assertEquals(103, value14, 5.1); // +17 + // assertEquals(47, value10, 2.1); // +21 + // assertEquals(41, value11, 4.1); // -3 + // assertEquals(42, value9, 2.1); // +6 + // assertEquals(44, value15, 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 // assertEquals(RESULT_TESTS_16, (double) test16a.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1); diff --git a/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment16/ChwHomePerformanceCheck.java b/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment16/ChwHomePerformanceCheck.java index ce47462c..8c73c415 100644 --- a/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment16/ChwHomePerformanceCheck.java +++ b/src/test/java/teetime/variant/methodcallWithPorts/examples/experiment16/ChwHomePerformanceCheck.java @@ -28,6 +28,6 @@ public class ChwHomePerformanceCheck implements PerformanceCheckProfile { System.out.println("speedupC: " + speedupC); assertEquals(2, speedupB, 0.3); - assertEquals(4, speedupC, 0.3); + assertEquals(3.5, speedupC, 0.3); } } -- GitLab