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

moved the legacy stages into a new package;

split the performance checks from one single file into multiple files
parent 4795d99c
No related branches found
No related tags found
No related merge requests found
Showing
with 224 additions and 36 deletions
...@@ -6,7 +6,6 @@ import java.util.concurrent.TimeUnit; ...@@ -6,7 +6,6 @@ import java.util.concurrent.TimeUnit;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule; import org.junit.Rule;
import org.junit.rules.TestRule; import org.junit.rules.TestRule;
import org.junit.rules.TestWatcher; import org.junit.rules.TestWatcher;
...@@ -17,6 +16,7 @@ import teetime.util.TimestampObject; ...@@ -17,6 +16,7 @@ import teetime.util.TimestampObject;
public abstract class PerformanceTest { public abstract class PerformanceTest {
protected static final PerformanceCheckProfileRepository PERFORMANCE_CHECK_PROFILE_REPOSITORY = PerformanceCheckProfileRepository.INSTANCE;
protected static final int NUM_OBJECTS_TO_CREATE = 1000000; protected static final int NUM_OBJECTS_TO_CREATE = 1000000;
protected static final int NUM_NOOP_FILTERS = 800; protected static final int NUM_NOOP_FILTERS = 800;
...@@ -27,8 +27,7 @@ public abstract class PerformanceTest { ...@@ -27,8 +27,7 @@ public abstract class PerformanceTest {
protected StopWatch stopWatch; protected StopWatch stopWatch;
protected List<TimestampObject> timestampObjects; protected List<TimestampObject> timestampObjects;
@BeforeClass static {
public static void beforeClass() {
System.setProperty("logback.configurationFile", "src/test/resources/logback-test.groovy"); System.setProperty("logback.configurationFile", "src/test/resources/logback-test.groovy");
} }
......
...@@ -27,12 +27,12 @@ public class ChwHomeComparisonMethodcallWithPorts implements PerformanceCheckPro ...@@ -27,12 +27,12 @@ public class ChwHomeComparisonMethodcallWithPorts implements PerformanceCheckPro
.get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)"); .get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)");
PerformanceResult test9 = performanceResults PerformanceResult test9 = performanceResults
.get("testWithManyObjects(teetime.examples.experiment09.MethodCallThoughputTimestampAnalysis9Test)"); .get("testWithManyObjects(teetime.examples.experiment09.MethodCallThoughputTimestampAnalysis9Test)");
PerformanceResult test10 = performanceResults // PerformanceResult test10 = performanceResults
.get("testWithManyObjects(teetime.examples.experiment10.MethodCallThoughputTimestampAnalysis10Test)"); // .get("testWithManyObjects(teetime.examples.experiment10.MethodCallThoughputTimestampAnalysis10Test)");
PerformanceResult test11 = performanceResults PerformanceResult test11 = performanceResults
.get("testWithManyObjects(teetime.examples.experiment11.MethodCallThoughputTimestampAnalysis11Test)"); .get("testWithManyObjects(teetime.examples.experiment11.MethodCallThoughputTimestampAnalysis11Test)");
PerformanceResult test14 = performanceResults // PerformanceResult test14 = performanceResults
.get("testWithManyObjects(teetime.examples.experiment14.MethodCallThoughputTimestampAnalysis14Test)"); // .get("testWithManyObjects(teetime.examples.experiment14.MethodCallThoughputTimestampAnalysis14Test)");
PerformanceResult test15 = performanceResults PerformanceResult test15 = performanceResults
.get("testWithManyObjects(teetime.examples.experiment15.MethodCallThoughputTimestampAnalysis15Test)"); .get("testWithManyObjects(teetime.examples.experiment15.MethodCallThoughputTimestampAnalysis15Test)");
PerformanceResult test16a = performanceResults PerformanceResult test16a = performanceResults
...@@ -50,8 +50,8 @@ public class ChwHomeComparisonMethodcallWithPorts implements PerformanceCheckPro ...@@ -50,8 +50,8 @@ public class ChwHomeComparisonMethodcallWithPorts implements PerformanceCheckPro
PerformanceResult test19c = performanceResults PerformanceResult test19c = performanceResults
.get("testWithManyObjectsAnd4Threads(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)"); .get("testWithManyObjectsAnd4Threads(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)");
double value14 = (double) test14.quantiles.get(0.5) / test1.quantiles.get(0.5); // double value14 = (double) test14.quantiles.get(0.5) / test1.quantiles.get(0.5);
double value10 = (double) test10.quantiles.get(0.5) / test1.quantiles.get(0.5); // double value10 = (double) test10.quantiles.get(0.5) / test1.quantiles.get(0.5);
double value11 = (double) test11.quantiles.get(0.5) / test1.quantiles.get(0.5); double value11 = (double) test11.quantiles.get(0.5) / test1.quantiles.get(0.5);
double value9 = (double) test9.quantiles.get(0.5) / test1.quantiles.get(0.5); double value9 = (double) test9.quantiles.get(0.5) / test1.quantiles.get(0.5);
double value15 = (double) test15.quantiles.get(0.5) / test1.quantiles.get(0.5); double value15 = (double) test15.quantiles.get(0.5) / test1.quantiles.get(0.5);
...@@ -59,8 +59,8 @@ public class ChwHomeComparisonMethodcallWithPorts implements PerformanceCheckPro ...@@ -59,8 +59,8 @@ public class ChwHomeComparisonMethodcallWithPorts implements PerformanceCheckPro
System.out.println("value9: " + value9); System.out.println("value9: " + value9);
System.out.println("value11: " + value11); System.out.println("value11: " + value11);
System.out.println("value10: " + value10); // System.out.println("value10: " + value10);
System.out.println("value14: " + value14); // System.out.println("value14: " + value14);
System.out.println("value15: " + value15); System.out.println("value15: " + value15);
System.out.println("value17: " + value17); System.out.println("value17: " + value17);
...@@ -99,8 +99,8 @@ public class ChwHomeComparisonMethodcallWithPorts implements PerformanceCheckPro ...@@ -99,8 +99,8 @@ public class ChwHomeComparisonMethodcallWithPorts implements PerformanceCheckPro
// since 31.08.2014 (incl.) // since 31.08.2014 (incl.)
assertEquals(44, value9, 2.1); // ?? assertEquals(44, value9, 2.1); // ??
assertEquals(43, value11, 4.1); // ?? assertEquals(43, value11, 4.1); // ??
assertEquals(51, value10, 2.1); // ?? // assertEquals(51, value10, 2.1); // ??
assertEquals(62, value14, 5.1); // ?? // assertEquals(62, value14, 5.1); // ??
assertEquals(68, value15, 4.1); // ?? assertEquals(68, value15, 4.1); // ??
assertEquals(75, value17, 4.1); // ?? assertEquals(75, value17, 4.1); // ??
......
...@@ -27,12 +27,12 @@ public class ChwWorkComparisonMethodcallWithPorts implements PerformanceCheckPro ...@@ -27,12 +27,12 @@ public class ChwWorkComparisonMethodcallWithPorts implements PerformanceCheckPro
.get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)"); .get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)");
PerformanceResult test9 = performanceResults PerformanceResult test9 = performanceResults
.get("testWithManyObjects(teetime.examples.experiment09.MethodCallThoughputTimestampAnalysis9Test)"); .get("testWithManyObjects(teetime.examples.experiment09.MethodCallThoughputTimestampAnalysis9Test)");
PerformanceResult test10 = performanceResults // PerformanceResult test10 = performanceResults
.get("testWithManyObjects(teetime.examples.experiment10.MethodCallThoughputTimestampAnalysis10Test)"); // .get("testWithManyObjects(teetime.examples.experiment10.MethodCallThoughputTimestampAnalysis10Test)");
PerformanceResult test11 = performanceResults PerformanceResult test11 = performanceResults
.get("testWithManyObjects(teetime.examples.experiment11.MethodCallThoughputTimestampAnalysis11Test)"); .get("testWithManyObjects(teetime.examples.experiment11.MethodCallThoughputTimestampAnalysis11Test)");
PerformanceResult test14 = performanceResults // PerformanceResult test14 = performanceResults
.get("testWithManyObjects(teetime.examples.experiment14.MethodCallThoughputTimestampAnalysis14Test)"); // .get("testWithManyObjects(teetime.examples.experiment14.MethodCallThoughputTimestampAnalysis14Test)");
PerformanceResult test15 = performanceResults PerformanceResult test15 = performanceResults
.get("testWithManyObjects(teetime.examples.experiment15.MethodCallThoughputTimestampAnalysis15Test)"); .get("testWithManyObjects(teetime.examples.experiment15.MethodCallThoughputTimestampAnalysis15Test)");
PerformanceResult test16a = performanceResults PerformanceResult test16a = performanceResults
...@@ -50,15 +50,15 @@ public class ChwWorkComparisonMethodcallWithPorts implements PerformanceCheckPro ...@@ -50,15 +50,15 @@ public class ChwWorkComparisonMethodcallWithPorts implements PerformanceCheckPro
PerformanceResult test19c = performanceResults PerformanceResult test19c = performanceResults
.get("testWithManyObjectsAnd4Threads(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)"); .get("testWithManyObjectsAnd4Threads(teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test)");
double value14 = (double) test14.quantiles.get(0.5) / test1.quantiles.get(0.5); // double value14 = (double) test14.quantiles.get(0.5) / test1.quantiles.get(0.5);
double value10 = (double) test10.quantiles.get(0.5) / test1.quantiles.get(0.5); // double value10 = (double) test10.quantiles.get(0.5) / test1.quantiles.get(0.5);
double value11 = (double) test11.quantiles.get(0.5) / test1.quantiles.get(0.5); double value11 = (double) test11.quantiles.get(0.5) / test1.quantiles.get(0.5);
double value9 = (double) test9.quantiles.get(0.5) / test1.quantiles.get(0.5); double value9 = (double) test9.quantiles.get(0.5) / test1.quantiles.get(0.5);
double value15 = (double) test15.quantiles.get(0.5) / test1.quantiles.get(0.5); double value15 = (double) test15.quantiles.get(0.5) / test1.quantiles.get(0.5);
double value17 = (double) test17.quantiles.get(0.5) / test1.quantiles.get(0.5); double value17 = (double) test17.quantiles.get(0.5) / test1.quantiles.get(0.5);
System.out.println("value14: " + value14); // System.out.println("value14: " + value14);
System.out.println("value10: " + value10); // System.out.println("value10: " + value10);
System.out.println("value11: " + value11); System.out.println("value11: " + value11);
System.out.println("value9: " + value9); System.out.println("value9: " + value9);
System.out.println("value15: " + value15); System.out.println("value15: " + value15);
...@@ -89,8 +89,15 @@ public class ChwWorkComparisonMethodcallWithPorts implements PerformanceCheckPro ...@@ -89,8 +89,15 @@ public class ChwWorkComparisonMethodcallWithPorts implements PerformanceCheckPro
// assertEquals(53, value17, 4.1); // +0 // assertEquals(53, value17, 4.1); // +0
// since 27.08.2014 (incl.) // since 27.08.2014 (incl.)
assertEquals(102, value14, 5.1); // +16 // assertEquals(102, value14, 5.1); // +16
assertEquals(56, value10, 2.1); // +30 // assertEquals(56, value10, 2.1); // +30
// assertEquals(64, value11, 4.1); // +15
// assertEquals(77, value9, 2.1); // +35
// assertEquals(44, value15, 4.1); // +0
// assertEquals(53, value17, 4.1); // +0
// since 14.10.2014 (incl.)
// assertEquals(25, value10, 2.1); // -26
assertEquals(64, value11, 4.1); // +15 assertEquals(64, value11, 4.1); // +15
assertEquals(77, value9, 2.1); // +35 assertEquals(77, value9, 2.1); // +35
assertEquals(44, value15, 4.1); // +0 assertEquals(44, value15, 4.1); // +0
......
...@@ -6,6 +6,7 @@ import org.junit.runner.RunWith; ...@@ -6,6 +6,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.Suite; import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses; import org.junit.runners.Suite.SuiteClasses;
import teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test;
import teetime.examples.experiment09.MethodCallThoughputTimestampAnalysis9Test; import teetime.examples.experiment09.MethodCallThoughputTimestampAnalysis9Test;
import teetime.examples.experiment10.MethodCallThoughputTimestampAnalysis10Test; import teetime.examples.experiment10.MethodCallThoughputTimestampAnalysis10Test;
import teetime.examples.experiment11.MethodCallThoughputTimestampAnalysis11Test; import teetime.examples.experiment11.MethodCallThoughputTimestampAnalysis11Test;
...@@ -19,7 +20,7 @@ import util.PerformanceCheckProfileRepository; ...@@ -19,7 +20,7 @@ import util.PerformanceCheckProfileRepository;
@RunWith(Suite.class) @RunWith(Suite.class)
@SuiteClasses({ @SuiteClasses({
// MethodCallThoughputTimestampAnalysis1Test.class, MethodCallThoughputTimestampAnalysis1Test.class,
MethodCallThoughputTimestampAnalysis9Test.class, MethodCallThoughputTimestampAnalysis9Test.class,
MethodCallThoughputTimestampAnalysis10Test.class, MethodCallThoughputTimestampAnalysis10Test.class,
MethodCallThoughputTimestampAnalysis11Test.class, MethodCallThoughputTimestampAnalysis11Test.class,
......
...@@ -17,6 +17,11 @@ package teetime.examples.experiment01; ...@@ -17,6 +17,11 @@ package teetime.examples.experiment01;
import java.util.List; import java.util.List;
import teetime.examples.experiment01.legacystage.LegacyCollectorSink;
import teetime.examples.experiment01.legacystage.LegacyNoopFilter;
import teetime.examples.experiment01.legacystage.LegacyObjectProducer;
import teetime.examples.experiment01.legacystage.LegacyStartTimestampFilter;
import teetime.examples.experiment01.legacystage.LegacyStopTimestampFilter;
import teetime.util.ConstructorClosure; import teetime.util.ConstructorClosure;
import teetime.util.TimestampObject; import teetime.util.TimestampObject;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
***************************************************************************/ ***************************************************************************/
package teetime.examples.experiment01; package teetime.examples.experiment01.legacystage;
import java.util.List; import java.util.List;
...@@ -46,7 +46,7 @@ public class LegacyCollectorSink<T> { ...@@ -46,7 +46,7 @@ public class LegacyCollectorSink<T> {
System.out.println("size: " + this.elements.size()); System.out.println("size: " + this.elements.size());
} }
protected Object execute(final T element) { public Object execute(final T element) {
this.elements.add(element); this.elements.add(element);
if ((this.elements.size() % this.threshold) == 0) { if ((this.elements.size() % this.threshold) == 0) {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
***************************************************************************/ ***************************************************************************/
package teetime.examples.experiment01; package teetime.examples.experiment01.legacystage;
/** /**
* @author Christian Wulf * @author Christian Wulf
...@@ -22,7 +22,7 @@ package teetime.examples.experiment01; ...@@ -22,7 +22,7 @@ package teetime.examples.experiment01;
*/ */
public class LegacyNoopFilter<T> { public class LegacyNoopFilter<T> {
protected T execute(final T element) { public T execute(final T element) {
return element; return element;
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
***************************************************************************/ ***************************************************************************/
package teetime.examples.experiment01; package teetime.examples.experiment01.legacystage;
import teetime.util.ConstructorClosure; import teetime.util.ConstructorClosure;
...@@ -51,7 +51,7 @@ public class LegacyObjectProducer<T> { ...@@ -51,7 +51,7 @@ public class LegacyObjectProducer<T> {
this.inputObjectCreator = inputObjectCreator; this.inputObjectCreator = inputObjectCreator;
} }
protected T execute() { public T execute() {
if (this.numInputObjects == 0) { if (this.numInputObjects == 0) {
return null; return null;
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
***************************************************************************/ ***************************************************************************/
package teetime.examples.experiment01; package teetime.examples.experiment01.legacystage;
import teetime.util.TimestampObject; import teetime.util.TimestampObject;
...@@ -24,7 +24,7 @@ import teetime.util.TimestampObject; ...@@ -24,7 +24,7 @@ import teetime.util.TimestampObject;
*/ */
public class LegacyStartTimestampFilter { public class LegacyStartTimestampFilter {
protected TimestampObject execute(final TimestampObject element) { public TimestampObject execute(final TimestampObject element) {
element.setStartTimestamp(System.nanoTime()); element.setStartTimestamp(System.nanoTime());
return element; return element;
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
***************************************************************************/ ***************************************************************************/
package teetime.examples.experiment01; package teetime.examples.experiment01.legacystage;
import teetime.util.TimestampObject; import teetime.util.TimestampObject;
...@@ -24,7 +24,7 @@ import teetime.util.TimestampObject; ...@@ -24,7 +24,7 @@ import teetime.util.TimestampObject;
*/ */
public class LegacyStopTimestampFilter { public class LegacyStopTimestampFilter {
protected TimestampObject execute(final TimestampObject element) { public TimestampObject execute(final TimestampObject element) {
element.setStopTimestamp(System.nanoTime()); element.setStopTimestamp(System.nanoTime());
return element; return element;
} }
......
package teetime.examples.experiment10;
import static org.junit.Assert.assertEquals;
import util.PerformanceCheckProfile;
import util.PerformanceResult;
import util.PerformanceTest;
public class ChwHomePerformanceCheck implements PerformanceCheckProfile {
@Override
public String getCorrespondingPerformanceProfile() {
return "ChwHome";
}
@Override
public void check() {
PerformanceResult test01 = PerformanceTest.measurementRepository.performanceResults
.get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)");
PerformanceResult test10 = PerformanceTest.measurementRepository.performanceResults
.get("testWithManyObjects(teetime.examples.experiment10.MethodCallThoughputTimestampAnalysis10Test)");
double meanSpeedup = (double) test10.quantiles.get(0.5) / test01.quantiles.get(0.5);
System.out.println("meanSpeedup (10): " + meanSpeedup);
// since 26.06.2014 (incl.)
// assertEquals(26, value10, 2.1); // +14
// // since 04.07.2014 (incl.)
// assertEquals(26, value10, 2.1); // +0
// since 11.08.2014 (incl.)
// assertEquals(47, value10, 2.1); // +21
// since 31.08.2014 (incl.)
assertEquals(51, meanSpeedup, 2.1);
}
}
package teetime.examples.experiment10;
import static org.junit.Assert.assertEquals;
import util.PerformanceCheckProfile;
import util.PerformanceResult;
import util.PerformanceTest;
public class ChwWorkPerformanceCheck implements PerformanceCheckProfile {
@Override
public String getCorrespondingPerformanceProfile() {
return "ChwWork";
}
@Override
public void check() {
PerformanceResult test01 = PerformanceTest.measurementRepository.performanceResults
.get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)");
PerformanceResult test10 = PerformanceTest.measurementRepository.performanceResults
.get("testWithManyObjects(teetime.examples.experiment10.MethodCallThoughputTimestampAnalysis10Test)");
double medianSpeedup = (double) test10.quantiles.get(0.5) / test01.quantiles.get(0.5);
System.out.println("medianSpeedup (10): " + medianSpeedup);
// until 25.06.2014 (incl.)
// assertEquals(14, (double) test10.quantiles.get(0.5) / test1.quantiles.get(0.5), 2.1);
// since 26.06.2014 (incl.)
// assertEquals(26, meanSpeedup, 2.1); // +14
// since 04.07.2014 (incl.)
// assertEquals(26, meanSpeedup, 2.1); // +0
// since 27.08.2014 (incl.)
// assertEquals(56, meanSpeedup, 2.1); // +30
// since 14.10.2014 (incl.)
assertEquals(56, medianSpeedup, 2.1); // +0
}
}
...@@ -15,19 +15,34 @@ ...@@ -15,19 +15,34 @@
***************************************************************************/ ***************************************************************************/
package teetime.examples.experiment10; package teetime.examples.experiment10;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import teetime.util.ConstructorClosure; import teetime.util.ConstructorClosure;
import teetime.util.TimestampObject; import teetime.util.TimestampObject;
import util.PerformanceCheckProfile;
import util.PerformanceTest; import util.PerformanceTest;
/** /**
* @author Christian Wulf * @author Christian Wulf
* *
* @since 1.10 * @since 1.10
*/ */
public class MethodCallThoughputTimestampAnalysis10Test extends PerformanceTest { public class MethodCallThoughputTimestampAnalysis10Test extends PerformanceTest {
@BeforeClass
public static void beforeClass() {
PERFORMANCE_CHECK_PROFILE_REPOSITORY.register(MethodCallThoughputTimestampAnalysis10Test.class, new ChwWorkPerformanceCheck());
PERFORMANCE_CHECK_PROFILE_REPOSITORY.register(MethodCallThoughputTimestampAnalysis10Test.class, new ChwHomePerformanceCheck());
};
@AfterClass
public static void afterClass() {
PerformanceCheckProfile performanceCheckProfile = PERFORMANCE_CHECK_PROFILE_REPOSITORY.get(MethodCallThoughputTimestampAnalysis10Test.class);
performanceCheckProfile.check();
};
@Test @Test
public void testWithManyObjects() { public void testWithManyObjects() {
System.out.println("Testing teetime (mc) with NUM_OBJECTS_TO_CREATE=" + NUM_OBJECTS_TO_CREATE + ", NUM_NOOP_FILTERS=" System.out.println("Testing teetime (mc) with NUM_OBJECTS_TO_CREATE=" + NUM_OBJECTS_TO_CREATE + ", NUM_NOOP_FILTERS="
......
package teetime.examples.experiment14;
import static org.junit.Assert.assertEquals;
import util.PerformanceCheckProfile;
import util.PerformanceResult;
import util.PerformanceTest;
public class ChwHomePerformanceCheck implements PerformanceCheckProfile {
@Override
public String getCorrespondingPerformanceProfile() {
return "ChwHome";
}
@Override
public void check() {
PerformanceResult test01 = PerformanceTest.measurementRepository.performanceResults
.get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)");
PerformanceResult test14 = PerformanceTest.measurementRepository.performanceResults
.get("testWithManyObjects(teetime.examples.experiment14.MethodCallThoughputTimestampAnalysis14Test)");
double medianSpeedup = (double) test14.quantiles.get(0.5) / test01.quantiles.get(0.5);
System.out.println("medianSpeedup (14): " + medianSpeedup);
// until 25.06.2014 (incl.)
// assertEquals(60, (double) test14.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1);
// since 26.06.2014 (incl.)
// assertEquals(76, medianSpeedup, 5.1); // +16
// since 04.07.2014 (incl.)
// assertEquals(86, medianSpeedup, 5.1); // +16
// since 11.08.2014 (incl.)
// assertEquals(103, medianSpeedup, 5.1); // +17
// since 31.08.2014 (incl.)
assertEquals(62, medianSpeedup, 2.1); // -41
}
}
package teetime.examples.experiment14;
import static org.junit.Assert.assertEquals;
import util.PerformanceCheckProfile;
import util.PerformanceResult;
import util.PerformanceTest;
public class ChwWorkPerformanceCheck implements PerformanceCheckProfile {
@Override
public String getCorrespondingPerformanceProfile() {
return "ChwWork";
}
@Override
public void check() {
PerformanceResult test01 = PerformanceTest.measurementRepository.performanceResults
.get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)");
PerformanceResult test14 = PerformanceTest.measurementRepository.performanceResults
.get("testWithManyObjects(teetime.examples.experiment14.MethodCallThoughputTimestampAnalysis14Test)");
double medianSpeedup = (double) test14.quantiles.get(0.5) / test01.quantiles.get(0.5);
System.out.println("medianSpeedup (14): " + medianSpeedup);
// until 25.06.2014 (incl.)
// assertEquals(60, (double) test14.quantiles.get(0.5) / test1.quantiles.get(0.5), 5.1);
// since 26.06.2014 (incl.)
// assertEquals(76, medianSpeedup, 5.1); // +16
// since 04.07.2014 (incl.)
// assertEquals(86, medianSpeedup, 5.1); // +16
// since 27.08.2014 (incl.)
// assertEquals(102, medianSpeedup, 5.1); // +16
// since 14.10.2014 (incl.)
assertEquals(53, medianSpeedup, 5.1); // -49
}
}
...@@ -15,19 +15,34 @@ ...@@ -15,19 +15,34 @@
***************************************************************************/ ***************************************************************************/
package teetime.examples.experiment14; package teetime.examples.experiment14;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import teetime.util.ConstructorClosure; import teetime.util.ConstructorClosure;
import teetime.util.TimestampObject; import teetime.util.TimestampObject;
import util.PerformanceCheckProfile;
import util.PerformanceTest; import util.PerformanceTest;
/** /**
* @author Christian Wulf * @author Christian Wulf
* *
* @since 1.10 * @since 1.10
*/ */
public class MethodCallThoughputTimestampAnalysis14Test extends PerformanceTest { public class MethodCallThoughputTimestampAnalysis14Test extends PerformanceTest {
@BeforeClass
public static void beforeClass() {
PERFORMANCE_CHECK_PROFILE_REPOSITORY.register(MethodCallThoughputTimestampAnalysis14Test.class, new ChwWorkPerformanceCheck());
PERFORMANCE_CHECK_PROFILE_REPOSITORY.register(MethodCallThoughputTimestampAnalysis14Test.class, new ChwHomePerformanceCheck());
};
@AfterClass
public static void afterClass() {
PerformanceCheckProfile performanceCheckProfile = PERFORMANCE_CHECK_PROFILE_REPOSITORY.get(MethodCallThoughputTimestampAnalysis14Test.class);
performanceCheckProfile.check();
};
@Test @Test
public void testWithManyObjects() { public void testWithManyObjects() {
System.out.println("Testing teetime (mc) with NUM_OBJECTS_TO_CREATE=" + NUM_OBJECTS_TO_CREATE + ", NUM_NOOP_FILTERS=" System.out.println("Testing teetime (mc) with NUM_OBJECTS_TO_CREATE=" + NUM_OBJECTS_TO_CREATE + ", NUM_NOOP_FILTERS="
......
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