diff --git a/src/main/java/util/BucketTimingsReader.java b/src/main/java/util/BucketTimingsReader.java index a857bd3671ae0c2876cbf143c53dc9ab693ac067..911c997bc391d6337a44fade8c04b75c3134a89f 100644 --- a/src/main/java/util/BucketTimingsReader.java +++ b/src/main/java/util/BucketTimingsReader.java @@ -11,6 +11,8 @@ import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import util.test.StatisticsUtil; + import com.google.common.base.Charsets; import com.google.common.io.CharSource; import com.google.common.io.Files; diff --git a/src/main/java/util/PerformanceCheckProfile.java b/src/main/java/util/PerformanceCheckProfile.java deleted file mode 100644 index 4fd7155694f3af58d3a7273be60c579f39468781..0000000000000000000000000000000000000000 --- a/src/main/java/util/PerformanceCheckProfile.java +++ /dev/null @@ -1,9 +0,0 @@ -package util; - -public interface PerformanceCheckProfile { - - String getCorrespondingPerformanceProfile(); - - void check(); - -} diff --git a/src/main/java/util/MeasurementRepository.java b/src/main/java/util/test/MeasurementRepository.java similarity index 91% rename from src/main/java/util/MeasurementRepository.java rename to src/main/java/util/test/MeasurementRepository.java index c970174d5e831e243502b3c730e0937d2187e3ce..d510c78520e59ae106b7ec77a6f8ca71d942e911 100644 --- a/src/main/java/util/MeasurementRepository.java +++ b/src/main/java/util/test/MeasurementRepository.java @@ -1,4 +1,4 @@ -package util; +package util.test; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/util/PerformanceCheckProfileRepository.java b/src/main/java/util/test/PerformanceCheckProfileRepository.java similarity index 75% rename from src/main/java/util/PerformanceCheckProfileRepository.java rename to src/main/java/util/test/PerformanceCheckProfileRepository.java index 066fdeb662d419bb21aca3bfa253707eadbf7caa..74b8ad37ec6b6e709fbf4c8fe972b60a565988f6 100644 --- a/src/main/java/util/PerformanceCheckProfileRepository.java +++ b/src/main/java/util/test/PerformanceCheckProfileRepository.java @@ -1,4 +1,4 @@ -package util; +package util.test; import java.util.HashMap; import java.util.Map; @@ -12,7 +12,7 @@ public class PerformanceCheckProfileRepository { public static final PerformanceCheckProfileRepository INSTANCE = new PerformanceCheckProfileRepository(); - private final Map<Class<?>, PerformanceCheckProfile> performanceCheckProfiles = new HashMap<Class<?>, PerformanceCheckProfile>(); + private final Map<Class<?>, ProfiledPerformanceAssertion> performanceCheckProfiles = new HashMap<Class<?>, ProfiledPerformanceAssertion>(); private String currentProfile; @@ -29,13 +29,13 @@ public class PerformanceCheckProfileRepository { return this.currentProfile; } - public void register(final Class<?> testClass, final PerformanceCheckProfile profile) { + public void register(final Class<?> testClass, final ProfiledPerformanceAssertion profile) { if (profile.getCorrespondingPerformanceProfile().equals(this.currentProfile)) { this.performanceCheckProfiles.put(testClass, profile); } } - public PerformanceCheckProfile get(final Class<?> clazz) { + public ProfiledPerformanceAssertion get(final Class<?> clazz) { return this.performanceCheckProfiles.get(clazz); } } diff --git a/src/main/java/util/PerformanceResult.java b/src/main/java/util/test/PerformanceResult.java similarity index 97% rename from src/main/java/util/PerformanceResult.java rename to src/main/java/util/test/PerformanceResult.java index 36c82832a1b7e0f22ddc2f25bcd6b27adb2aa6ad..22cf87e3069066fc0b224de3062fa69bc4dda835 100644 --- a/src/main/java/util/PerformanceResult.java +++ b/src/main/java/util/test/PerformanceResult.java @@ -1,4 +1,4 @@ -package util; +package util.test; import java.util.Map; diff --git a/src/main/java/util/PerformanceTest.java b/src/main/java/util/test/PerformanceTest.java similarity index 99% rename from src/main/java/util/PerformanceTest.java rename to src/main/java/util/test/PerformanceTest.java index 24bf696601552e3dd4ef5da201ec3416b9eb0cf0..d2f9e3ba8674e393a3460cf6731d70f7c785fc14 100644 --- a/src/main/java/util/PerformanceTest.java +++ b/src/main/java/util/test/PerformanceTest.java @@ -1,4 +1,4 @@ -package util; +package util.test; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/util/test/ProfiledPerformanceAssertion.java b/src/main/java/util/test/ProfiledPerformanceAssertion.java new file mode 100644 index 0000000000000000000000000000000000000000..88f300355d0ef137aff12d6677307939e4c529a5 --- /dev/null +++ b/src/main/java/util/test/ProfiledPerformanceAssertion.java @@ -0,0 +1,12 @@ +package util.test; + +public abstract class ProfiledPerformanceAssertion { + + public abstract String getCorrespondingPerformanceProfile(); + + public abstract void check(); + + protected String buildTestMethodIdentifier(final Class<? extends PerformanceTest> testClass, final String methodName) { + return testClass.getName() + "(" + methodName + ")"; + } +} diff --git a/src/main/java/util/StatisticsUtil.java b/src/main/java/util/test/StatisticsUtil.java similarity index 99% rename from src/main/java/util/StatisticsUtil.java rename to src/main/java/util/test/StatisticsUtil.java index 62d0d0e741072e8d51fbb8706bc796264b8c9d65..a0f091bc5a66c3788887a94143b1733bd90fa920 100644 --- a/src/main/java/util/StatisticsUtil.java +++ b/src/main/java/util/test/StatisticsUtil.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. ***************************************************************************/ -package util; +package util.test; import java.util.ArrayList; import java.util.Collections; diff --git a/src/performancetest/java/kieker/analysis/examples/throughput/ThroughputTimestampAnalysisTest.java b/src/performancetest/java/kieker/analysis/examples/throughput/ThroughputTimestampAnalysisTest.java index 95d173d6d73aed4336d09ea9654be12d444429f3..2e92b7c42e38404d8691772e3cb9209723f4d55d 100644 --- a/src/performancetest/java/kieker/analysis/examples/throughput/ThroughputTimestampAnalysisTest.java +++ b/src/performancetest/java/kieker/analysis/examples/throughput/ThroughputTimestampAnalysisTest.java @@ -23,8 +23,8 @@ import org.junit.Test; import teetime.util.StopWatch; import teetime.util.TimestampObject; -import util.PerformanceTest; -import util.StatisticsUtil; +import util.test.PerformanceTest; +import util.test.StatisticsUtil; import kieker.analysis.examples.ThroughputTimestampAnalysis; import kieker.analysis.exception.AnalysisConfigurationException; diff --git a/src/performancetest/java/teetime/examples/ChwHomeComparisonMethodcallWithPorts.java b/src/performancetest/java/teetime/examples/ChwHomeComparisonMethodcallWithPorts.java index 22d6c76deb405c391666bbb9e100b67eaa616d23..52105427b358d1f6e97fc709eb0f5553283f3ac8 100644 --- a/src/performancetest/java/teetime/examples/ChwHomeComparisonMethodcallWithPorts.java +++ b/src/performancetest/java/teetime/examples/ChwHomeComparisonMethodcallWithPorts.java @@ -5,11 +5,11 @@ import static org.junit.Assert.assertEquals; import java.util.Map; import java.util.Map.Entry; -import util.PerformanceCheckProfile; -import util.PerformanceResult; -import util.PerformanceTest; +import util.test.PerformanceResult; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; -public class ChwHomeComparisonMethodcallWithPorts implements PerformanceCheckProfile { +public class ChwHomeComparisonMethodcallWithPorts extends ProfiledPerformanceAssertion { @Override public String getCorrespondingPerformanceProfile() { diff --git a/src/performancetest/java/teetime/examples/ChwWorkComparisonMethodcallWithPorts.java b/src/performancetest/java/teetime/examples/ChwWorkComparisonMethodcallWithPorts.java index 4358d96e1b7d2630920758c7b69fe8ba4b321d80..38116b72e74c17fa94ce080b1edec976167a0738 100644 --- a/src/performancetest/java/teetime/examples/ChwWorkComparisonMethodcallWithPorts.java +++ b/src/performancetest/java/teetime/examples/ChwWorkComparisonMethodcallWithPorts.java @@ -5,11 +5,11 @@ import static org.junit.Assert.assertEquals; import java.util.Map; import java.util.Map.Entry; -import util.PerformanceCheckProfile; -import util.PerformanceResult; -import util.PerformanceTest; +import util.test.PerformanceResult; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; -public class ChwWorkComparisonMethodcallWithPorts implements PerformanceCheckProfile { +public class ChwWorkComparisonMethodcallWithPorts extends ProfiledPerformanceAssertion { @Override public String getCorrespondingPerformanceProfile() { diff --git a/src/performancetest/java/teetime/examples/ComparisonMethodcallWithPorts.java b/src/performancetest/java/teetime/examples/ComparisonMethodcallWithPorts.java index 0d59913581c3839942cf2f4693b37f367fddcb5a..26a913942e5f85a09fbe418273b2d175a794876e 100644 --- a/src/performancetest/java/teetime/examples/ComparisonMethodcallWithPorts.java +++ b/src/performancetest/java/teetime/examples/ComparisonMethodcallWithPorts.java @@ -15,8 +15,8 @@ import teetime.examples.experiment15.MethodCallThoughputTimestampAnalysis15Test; import teetime.examples.experiment16.MethodCallThoughputTimestampAnalysis16Test; import teetime.examples.experiment17.MethodCallThoughputTimestampAnalysis17Test; import teetime.examples.experiment19.MethodCallThoughputTimestampAnalysis19Test; -import util.PerformanceCheckProfile; -import util.PerformanceCheckProfileRepository; +import util.test.PerformanceCheckProfileRepository; +import util.test.ProfiledPerformanceAssertion; @RunWith(Suite.class) @SuiteClasses({ @@ -42,7 +42,7 @@ public class ComparisonMethodcallWithPorts { @AfterClass public static void compareResults() { - PerformanceCheckProfile pcp = PerformanceCheckProfileRepository.INSTANCE.get(ComparisonMethodcallWithPorts.class); + ProfiledPerformanceAssertion pcp = PerformanceCheckProfileRepository.INSTANCE.get(ComparisonMethodcallWithPorts.class); pcp.check(); } diff --git a/src/performancetest/java/teetime/examples/NieWorkComparisonMethodcallWithPorts.java b/src/performancetest/java/teetime/examples/NieWorkComparisonMethodcallWithPorts.java index bb3c2f6c434264d7fa5283d4ad4d4cf1b4e31ef9..ea8e30a49b7c2e27c1791582d983e7626678060f 100644 --- a/src/performancetest/java/teetime/examples/NieWorkComparisonMethodcallWithPorts.java +++ b/src/performancetest/java/teetime/examples/NieWorkComparisonMethodcallWithPorts.java @@ -5,11 +5,11 @@ import static org.junit.Assert.assertEquals; import java.util.Map; import java.util.Map.Entry; -import util.PerformanceCheckProfile; -import util.PerformanceResult; -import util.PerformanceTest; +import util.test.PerformanceResult; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; -public class NieWorkComparisonMethodcallWithPorts implements PerformanceCheckProfile { +public class NieWorkComparisonMethodcallWithPorts extends ProfiledPerformanceAssertion { @Override public String getCorrespondingPerformanceProfile() { diff --git a/src/performancetest/java/teetime/examples/experiment01/ChwHomePerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment01/ChwHomePerformanceCheck.java index 525abdb84b7630dd8c3da6355b8dbef9e1af098b..9c9321d3bfccbe7a004a9b5e31ff8ec24702f52f 100644 --- a/src/performancetest/java/teetime/examples/experiment01/ChwHomePerformanceCheck.java +++ b/src/performancetest/java/teetime/examples/experiment01/ChwHomePerformanceCheck.java @@ -1,11 +1,11 @@ package teetime.examples.experiment01; import static org.junit.Assert.assertEquals; -import util.PerformanceCheckProfile; -import util.PerformanceResult; -import util.PerformanceTest; +import util.test.PerformanceResult; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; -public class ChwHomePerformanceCheck implements PerformanceCheckProfile { +public class ChwHomePerformanceCheck extends ProfiledPerformanceAssertion { @Override public String getCorrespondingPerformanceProfile() { diff --git a/src/performancetest/java/teetime/examples/experiment01/ChwWorkPerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment01/ChwWorkPerformanceCheck.java index 3229033091c918d7556168a446dab9804066be19..0f7c9f1912896f178be06e132f36508ab8c7cd51 100644 --- a/src/performancetest/java/teetime/examples/experiment01/ChwWorkPerformanceCheck.java +++ b/src/performancetest/java/teetime/examples/experiment01/ChwWorkPerformanceCheck.java @@ -1,11 +1,11 @@ package teetime.examples.experiment01; import static org.junit.Assert.assertEquals; -import util.PerformanceCheckProfile; -import util.PerformanceResult; -import util.PerformanceTest; +import util.test.PerformanceResult; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; -public class ChwWorkPerformanceCheck implements PerformanceCheckProfile { +public class ChwWorkPerformanceCheck extends ProfiledPerformanceAssertion { @Override public String getCorrespondingPerformanceProfile() { diff --git a/src/performancetest/java/teetime/examples/experiment01/MethodCallThoughputTimestampAnalysis1Test.java b/src/performancetest/java/teetime/examples/experiment01/MethodCallThoughputTimestampAnalysis1Test.java index e5385b35ac704f75321c46ab66972ec230754d1a..6577d3a39584285b83403a502e4bf83f5229505d 100644 --- a/src/performancetest/java/teetime/examples/experiment01/MethodCallThoughputTimestampAnalysis1Test.java +++ b/src/performancetest/java/teetime/examples/experiment01/MethodCallThoughputTimestampAnalysis1Test.java @@ -21,9 +21,9 @@ import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.TimestampObject; -import util.PerformanceCheckProfile; -import util.PerformanceCheckProfileRepository; -import util.PerformanceTest; +import util.test.PerformanceCheckProfileRepository; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; /** * @author Christian Wulf @@ -40,7 +40,7 @@ public class MethodCallThoughputTimestampAnalysis1Test extends PerformanceTest { @AfterClass public static void afterClass() { - PerformanceCheckProfile performanceCheckProfile = PerformanceCheckProfileRepository.INSTANCE.get(MethodCallThoughputTimestampAnalysis1Test.class); + ProfiledPerformanceAssertion performanceCheckProfile = PerformanceCheckProfileRepository.INSTANCE.get(MethodCallThoughputTimestampAnalysis1Test.class); performanceCheckProfile.check(); }; diff --git a/src/performancetest/java/teetime/examples/experiment09/MethodCallThoughputTimestampAnalysis9Test.java b/src/performancetest/java/teetime/examples/experiment09/MethodCallThoughputTimestampAnalysis9Test.java index bd5d52fa6c0d9eed4ad6a7e81989a8cdfc021349..489f6e4a78494ca24b5792f7d1b2859f295d7e3b 100644 --- a/src/performancetest/java/teetime/examples/experiment09/MethodCallThoughputTimestampAnalysis9Test.java +++ b/src/performancetest/java/teetime/examples/experiment09/MethodCallThoughputTimestampAnalysis9Test.java @@ -19,7 +19,7 @@ import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.TimestampObject; -import util.PerformanceTest; +import util.test.PerformanceTest; /** * @author Christian Wulf diff --git a/src/performancetest/java/teetime/examples/experiment10/ChwHomePerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment10/ChwHomePerformanceCheck.java index 50b7485823078c62aa8f32249fe1c3897175e2b3..20fffa4c24079f1f761ad40825af0ee89d7736a4 100644 --- a/src/performancetest/java/teetime/examples/experiment10/ChwHomePerformanceCheck.java +++ b/src/performancetest/java/teetime/examples/experiment10/ChwHomePerformanceCheck.java @@ -1,11 +1,11 @@ package teetime.examples.experiment10; import static org.junit.Assert.assertEquals; -import util.PerformanceCheckProfile; -import util.PerformanceResult; -import util.PerformanceTest; +import util.test.PerformanceResult; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; -public class ChwHomePerformanceCheck implements PerformanceCheckProfile { +public class ChwHomePerformanceCheck extends ProfiledPerformanceAssertion { @Override public String getCorrespondingPerformanceProfile() { diff --git a/src/performancetest/java/teetime/examples/experiment10/ChwWorkPerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment10/ChwWorkPerformanceCheck.java index 27a03972cf00b0d6ad9a11f1c42105d7dda68b27..70d999686ddbf253c88614185f878d78d5986689 100644 --- a/src/performancetest/java/teetime/examples/experiment10/ChwWorkPerformanceCheck.java +++ b/src/performancetest/java/teetime/examples/experiment10/ChwWorkPerformanceCheck.java @@ -1,11 +1,11 @@ package teetime.examples.experiment10; import static org.junit.Assert.assertEquals; -import util.PerformanceCheckProfile; -import util.PerformanceResult; -import util.PerformanceTest; +import util.test.PerformanceResult; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; -public class ChwWorkPerformanceCheck implements PerformanceCheckProfile { +public class ChwWorkPerformanceCheck extends ProfiledPerformanceAssertion { @Override public String getCorrespondingPerformanceProfile() { diff --git a/src/performancetest/java/teetime/examples/experiment10/MethodCallThoughputTimestampAnalysis10Test.java b/src/performancetest/java/teetime/examples/experiment10/MethodCallThoughputTimestampAnalysis10Test.java index eea715af68d8e196e1b0f41eb99bbf42f7601d5e..f73409d333e023ebe57d956dcc1a7d82c14809f6 100644 --- a/src/performancetest/java/teetime/examples/experiment10/MethodCallThoughputTimestampAnalysis10Test.java +++ b/src/performancetest/java/teetime/examples/experiment10/MethodCallThoughputTimestampAnalysis10Test.java @@ -21,8 +21,8 @@ import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.TimestampObject; -import util.PerformanceCheckProfile; -import util.PerformanceTest; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; /** * @author Christian Wulf @@ -39,7 +39,7 @@ public class MethodCallThoughputTimestampAnalysis10Test extends PerformanceTest @AfterClass public static void afterClass() { - PerformanceCheckProfile performanceCheckProfile = PERFORMANCE_CHECK_PROFILE_REPOSITORY.get(MethodCallThoughputTimestampAnalysis10Test.class); + ProfiledPerformanceAssertion performanceCheckProfile = PERFORMANCE_CHECK_PROFILE_REPOSITORY.get(MethodCallThoughputTimestampAnalysis10Test.class); performanceCheckProfile.check(); }; diff --git a/src/performancetest/java/teetime/examples/experiment11/ChwHomePerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment11/ChwHomePerformanceCheck.java index 29a1bc8a00db80546346c380d63256297b894b74..6b5d256d1ac58d6147532a0b9dbbf4ce522f9b06 100644 --- a/src/performancetest/java/teetime/examples/experiment11/ChwHomePerformanceCheck.java +++ b/src/performancetest/java/teetime/examples/experiment11/ChwHomePerformanceCheck.java @@ -1,11 +1,11 @@ package teetime.examples.experiment11; import static org.junit.Assert.assertEquals; -import util.PerformanceCheckProfile; -import util.PerformanceResult; -import util.PerformanceTest; +import util.test.PerformanceResult; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; -public class ChwHomePerformanceCheck implements PerformanceCheckProfile { +public class ChwHomePerformanceCheck extends ProfiledPerformanceAssertion { @Override public String getCorrespondingPerformanceProfile() { diff --git a/src/performancetest/java/teetime/examples/experiment11/ChwWorkPerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment11/ChwWorkPerformanceCheck.java index 175c14022b1b14505699f0c2be1dd8a4b3369246..65049146d5c0fa586343bbc91c91f0b3c8c4bb59 100644 --- a/src/performancetest/java/teetime/examples/experiment11/ChwWorkPerformanceCheck.java +++ b/src/performancetest/java/teetime/examples/experiment11/ChwWorkPerformanceCheck.java @@ -1,11 +1,11 @@ package teetime.examples.experiment11; import static org.junit.Assert.assertEquals; -import util.PerformanceCheckProfile; -import util.PerformanceResult; -import util.PerformanceTest; +import util.test.PerformanceResult; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; -public class ChwWorkPerformanceCheck implements PerformanceCheckProfile { +public class ChwWorkPerformanceCheck extends ProfiledPerformanceAssertion { @Override public String getCorrespondingPerformanceProfile() { diff --git a/src/performancetest/java/teetime/examples/experiment11/MethodCallThoughputTimestampAnalysis11Test.java b/src/performancetest/java/teetime/examples/experiment11/MethodCallThoughputTimestampAnalysis11Test.java index 915a906f5943a9b808826b7e6bbd7afe827f2bc5..80e22ff08ea51e7e721e36cd2d71527dd205b9ac 100644 --- a/src/performancetest/java/teetime/examples/experiment11/MethodCallThoughputTimestampAnalysis11Test.java +++ b/src/performancetest/java/teetime/examples/experiment11/MethodCallThoughputTimestampAnalysis11Test.java @@ -21,8 +21,8 @@ import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.TimestampObject; -import util.PerformanceCheckProfile; -import util.PerformanceTest; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; /** * @author Christian Wulf @@ -39,7 +39,7 @@ public class MethodCallThoughputTimestampAnalysis11Test extends PerformanceTest @AfterClass public static void afterClass() { - PerformanceCheckProfile performanceCheckProfile = PERFORMANCE_CHECK_PROFILE_REPOSITORY.get(MethodCallThoughputTimestampAnalysis11Test.class); + ProfiledPerformanceAssertion performanceCheckProfile = PERFORMANCE_CHECK_PROFILE_REPOSITORY.get(MethodCallThoughputTimestampAnalysis11Test.class); performanceCheckProfile.check(); }; diff --git a/src/performancetest/java/teetime/examples/experiment14/ChwHomePerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment14/ChwHomePerformanceCheck.java index 562e6e4fda1435cde228f1d5a043ff3fba6e5ab3..13ea4e873046f5bd4bd2b89cdc698f91931cc455 100644 --- a/src/performancetest/java/teetime/examples/experiment14/ChwHomePerformanceCheck.java +++ b/src/performancetest/java/teetime/examples/experiment14/ChwHomePerformanceCheck.java @@ -1,11 +1,11 @@ package teetime.examples.experiment14; import static org.junit.Assert.assertEquals; -import util.PerformanceCheckProfile; -import util.PerformanceResult; -import util.PerformanceTest; +import util.test.PerformanceResult; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; -public class ChwHomePerformanceCheck implements PerformanceCheckProfile { +public class ChwHomePerformanceCheck extends ProfiledPerformanceAssertion { @Override public String getCorrespondingPerformanceProfile() { diff --git a/src/performancetest/java/teetime/examples/experiment14/ChwWorkPerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment14/ChwWorkPerformanceCheck.java index 88f4e710c0fb5aa2573847719d25be2558ed2156..8f2dabdc54cf55b1d6d59fecaa763c9a994f6497 100644 --- a/src/performancetest/java/teetime/examples/experiment14/ChwWorkPerformanceCheck.java +++ b/src/performancetest/java/teetime/examples/experiment14/ChwWorkPerformanceCheck.java @@ -1,11 +1,12 @@ package teetime.examples.experiment14; import static org.junit.Assert.assertEquals; -import util.PerformanceCheckProfile; -import util.PerformanceResult; -import util.PerformanceTest; +import teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test; +import util.test.PerformanceResult; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; -public class ChwWorkPerformanceCheck implements PerformanceCheckProfile { +public class ChwWorkPerformanceCheck extends ProfiledPerformanceAssertion { @Override public String getCorrespondingPerformanceProfile() { @@ -15,9 +16,9 @@ public class ChwWorkPerformanceCheck implements PerformanceCheckProfile { @Override public void check() { PerformanceResult test01 = PerformanceTest.measurementRepository.performanceResults - .get("testWithManyObjects(teetime.examples.experiment01.MethodCallThoughputTimestampAnalysis1Test)"); + .get(buildTestMethodIdentifier(MethodCallThoughputTimestampAnalysis1Test.class, "testWithManyObjects")); PerformanceResult test14 = PerformanceTest.measurementRepository.performanceResults - .get("testWithManyObjects(teetime.examples.experiment14.MethodCallThoughputTimestampAnalysis14Test)"); + .get(buildTestMethodIdentifier(MethodCallThoughputTimestampAnalysis14Test.class, "testWithManyObjects")); double medianSpeedup = (double) test14.quantiles.get(0.5) / test01.quantiles.get(0.5); diff --git a/src/performancetest/java/teetime/examples/experiment14/MethodCallThoughputTimestampAnalysis14Test.java b/src/performancetest/java/teetime/examples/experiment14/MethodCallThoughputTimestampAnalysis14Test.java index fe500b4cb0f4ba880ecadb336649251ce80731cd..3d743f81f0117071c84403f59e8adc5e558765d1 100644 --- a/src/performancetest/java/teetime/examples/experiment14/MethodCallThoughputTimestampAnalysis14Test.java +++ b/src/performancetest/java/teetime/examples/experiment14/MethodCallThoughputTimestampAnalysis14Test.java @@ -21,8 +21,8 @@ import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.TimestampObject; -import util.PerformanceCheckProfile; -import util.PerformanceTest; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; /** * @author Christian Wulf @@ -39,7 +39,7 @@ public class MethodCallThoughputTimestampAnalysis14Test extends PerformanceTest @AfterClass public static void afterClass() { - PerformanceCheckProfile performanceCheckProfile = PERFORMANCE_CHECK_PROFILE_REPOSITORY.get(MethodCallThoughputTimestampAnalysis14Test.class); + ProfiledPerformanceAssertion performanceCheckProfile = PERFORMANCE_CHECK_PROFILE_REPOSITORY.get(MethodCallThoughputTimestampAnalysis14Test.class); performanceCheckProfile.check(); }; diff --git a/src/performancetest/java/teetime/examples/experiment15/MethodCallThoughputTimestampAnalysis15Test.java b/src/performancetest/java/teetime/examples/experiment15/MethodCallThoughputTimestampAnalysis15Test.java index 91faf50943bd301c7c395a24d384d6afd6b4f1af..356647b0f19e5fbe80d27e98847d32f5a8a8de92 100644 --- a/src/performancetest/java/teetime/examples/experiment15/MethodCallThoughputTimestampAnalysis15Test.java +++ b/src/performancetest/java/teetime/examples/experiment15/MethodCallThoughputTimestampAnalysis15Test.java @@ -19,7 +19,7 @@ import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.TimestampObject; -import util.PerformanceTest; +import util.test.PerformanceTest; /** * @author Christian Wulf diff --git a/src/performancetest/java/teetime/examples/experiment16/ChwHomePerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment16/ChwHomePerformanceCheck.java index a3106094fb720993ecbd804ef6ad7cc67d58c0be..29a27cf7b1b80831cc30b5db330429f51686a399 100644 --- a/src/performancetest/java/teetime/examples/experiment16/ChwHomePerformanceCheck.java +++ b/src/performancetest/java/teetime/examples/experiment16/ChwHomePerformanceCheck.java @@ -1,11 +1,11 @@ package teetime.examples.experiment16; import static org.junit.Assert.assertEquals; -import util.PerformanceCheckProfile; -import util.PerformanceResult; -import util.PerformanceTest; +import util.test.PerformanceResult; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; -public class ChwHomePerformanceCheck implements PerformanceCheckProfile { +public class ChwHomePerformanceCheck extends ProfiledPerformanceAssertion { @Override public String getCorrespondingPerformanceProfile() { diff --git a/src/performancetest/java/teetime/examples/experiment16/ChwWorkPerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment16/ChwWorkPerformanceCheck.java index eba4502dfcf156fbc90d99838d11d0da4ca768f3..8aeae42d96d7c92a9f652774ed37612e8dc3e9de 100644 --- a/src/performancetest/java/teetime/examples/experiment16/ChwWorkPerformanceCheck.java +++ b/src/performancetest/java/teetime/examples/experiment16/ChwWorkPerformanceCheck.java @@ -1,11 +1,11 @@ package teetime.examples.experiment16; import static org.junit.Assert.assertEquals; -import util.PerformanceCheckProfile; -import util.PerformanceResult; -import util.PerformanceTest; +import util.test.PerformanceResult; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; -public class ChwWorkPerformanceCheck implements PerformanceCheckProfile { +public class ChwWorkPerformanceCheck extends ProfiledPerformanceAssertion { @Override public void check() { diff --git a/src/performancetest/java/teetime/examples/experiment16/MethodCallThoughputTimestampAnalysis16Test.java b/src/performancetest/java/teetime/examples/experiment16/MethodCallThoughputTimestampAnalysis16Test.java index b0f56fd45d872d68fa01f5a8399211e0d73446dc..7dd7ea2b0e1b8536d0afd902e5a88f0db4606bd9 100644 --- a/src/performancetest/java/teetime/examples/experiment16/MethodCallThoughputTimestampAnalysis16Test.java +++ b/src/performancetest/java/teetime/examples/experiment16/MethodCallThoughputTimestampAnalysis16Test.java @@ -24,9 +24,9 @@ import org.junit.runners.MethodSorters; import teetime.util.ConstructorClosure; import teetime.util.ListUtil; import teetime.util.TimestampObject; -import util.PerformanceCheckProfile; -import util.PerformanceCheckProfileRepository; -import util.PerformanceTest; +import util.test.PerformanceCheckProfileRepository; +import util.test.PerformanceTest; +import util.test.ProfiledPerformanceAssertion; /** * @author Christian Wulf @@ -42,7 +42,13 @@ public class MethodCallThoughputTimestampAnalysis16Test extends PerformanceTest public static void beforeClass() { PerformanceCheckProfileRepository.INSTANCE.register(MethodCallThoughputTimestampAnalysis16Test.class, new ChwWorkPerformanceCheck()); PerformanceCheckProfileRepository.INSTANCE.register(MethodCallThoughputTimestampAnalysis16Test.class, new ChwHomePerformanceCheck()); - }; + } + + @AfterClass + public static void afterClass() { + ProfiledPerformanceAssertion pcp = PerformanceCheckProfileRepository.INSTANCE.get(MethodCallThoughputTimestampAnalysis16Test.class); + pcp.check(); + } @Test public void testWithManyObjectsAnd1Thread() { @@ -59,12 +65,6 @@ public class MethodCallThoughputTimestampAnalysis16Test extends PerformanceTest this.performAnalysis(4); } - @AfterClass - public static void afterClass() { - PerformanceCheckProfile pcp = PerformanceCheckProfileRepository.INSTANCE.get(MethodCallThoughputTimestampAnalysis16Test.class); - pcp.check(); - } - private void performAnalysis(final int numThreads) { System.out.println("Testing teetime (mc) with NUM_OBJECTS_TO_CREATE=" + NUM_OBJECTS_TO_CREATE + ", NUM_NOOP_FILTERS=" + NUM_NOOP_FILTERS + "..."); diff --git a/src/performancetest/java/teetime/examples/experiment17/MethodCallThoughputTimestampAnalysis17Test.java b/src/performancetest/java/teetime/examples/experiment17/MethodCallThoughputTimestampAnalysis17Test.java index 28b98f9b8562a90b5a545bc084febcb543e9fd92..650d11706482de244efd7db554a15041c0731391 100644 --- a/src/performancetest/java/teetime/examples/experiment17/MethodCallThoughputTimestampAnalysis17Test.java +++ b/src/performancetest/java/teetime/examples/experiment17/MethodCallThoughputTimestampAnalysis17Test.java @@ -20,7 +20,7 @@ import org.junit.Test; import teetime.util.ConstructorClosure; import teetime.util.ListUtil; import teetime.util.TimestampObject; -import util.PerformanceTest; +import util.test.PerformanceTest; /** * @author Christian Wulf diff --git a/src/performancetest/java/teetime/examples/experiment19/MethodCallThoughputTimestampAnalysis19Test.java b/src/performancetest/java/teetime/examples/experiment19/MethodCallThoughputTimestampAnalysis19Test.java index b3e69c82fe98d8d1f855cb2fd6040cc05e56c33f..59d13f1d98a19fde419451f63662eabdc5fa4b0d 100644 --- a/src/performancetest/java/teetime/examples/experiment19/MethodCallThoughputTimestampAnalysis19Test.java +++ b/src/performancetest/java/teetime/examples/experiment19/MethodCallThoughputTimestampAnalysis19Test.java @@ -22,7 +22,7 @@ import org.junit.runners.MethodSorters; import teetime.util.ConstructorClosure; import teetime.util.ListUtil; import teetime.util.TimestampObject; -import util.PerformanceTest; +import util.test.PerformanceTest; /** * @author Christian Wulf diff --git a/src/performancetest/java/teetime/examples/traceReading/ChwHomeTcpTraceReadingTest.java b/src/performancetest/java/teetime/examples/traceReading/ChwHomeTcpTraceReadingTest.java index c5f90a27dd45e3f3770c9618b5730302334d060c..6b23a328646b716b1e0f1a743ea94d05df655959 100644 --- a/src/performancetest/java/teetime/examples/traceReading/ChwHomeTcpTraceReadingTest.java +++ b/src/performancetest/java/teetime/examples/traceReading/ChwHomeTcpTraceReadingTest.java @@ -34,7 +34,7 @@ import org.junit.runners.MethodSorters; import teetime.util.ListUtil; import teetime.util.StopWatch; -import util.StatisticsUtil; +import util.test.StatisticsUtil; /** * @author Christian Wulf diff --git a/src/performancetest/java/teetime/examples/traceReconstruction/ChwHomeTcpTraceReconstructionAnalysisTest.java b/src/performancetest/java/teetime/examples/traceReconstruction/ChwHomeTcpTraceReconstructionAnalysisTest.java index 977cf394791587b3519c5b265cbf7d5b05f16c69..1158dade907c11c392f4e6e30ff4cd16a3db55e7 100644 --- a/src/performancetest/java/teetime/examples/traceReconstruction/ChwHomeTcpTraceReconstructionAnalysisTest.java +++ b/src/performancetest/java/teetime/examples/traceReconstruction/ChwHomeTcpTraceReconstructionAnalysisTest.java @@ -32,7 +32,7 @@ import org.junit.Test; import teetime.util.ListUtil; import teetime.util.StopWatch; -import util.StatisticsUtil; +import util.test.StatisticsUtil; /** * @author Christian Wulf diff --git a/src/performancetest/java/teetime/examples/traceReconstruction/ChwHomeTraceReconstructionAnalysisTest.java b/src/performancetest/java/teetime/examples/traceReconstruction/ChwHomeTraceReconstructionAnalysisTest.java index f20679d55dcc20fd163ffe5bfa972ea06b6c1cc8..bf85954aff055d7cfc44b52da3acc95431c3d146 100644 --- a/src/performancetest/java/teetime/examples/traceReconstruction/ChwHomeTraceReconstructionAnalysisTest.java +++ b/src/performancetest/java/teetime/examples/traceReconstruction/ChwHomeTraceReconstructionAnalysisTest.java @@ -31,7 +31,7 @@ import org.junit.Before; import org.junit.Test; import teetime.util.StopWatch; -import util.StatisticsUtil; +import util.test.StatisticsUtil; import kieker.analysis.plugin.filter.flow.TraceEventRecords; diff --git a/src/performancetest/java/teetime/examples/traceReconstruction/ChwWorkTcpTraceReconstructionAnalysisTest.java b/src/performancetest/java/teetime/examples/traceReconstruction/ChwWorkTcpTraceReconstructionAnalysisTest.java index e05b673d6b31b5d8384604bd2261128b543bfb8b..8bc965b84c26c72a8074ab469ae9ea76ba4ea72d 100644 --- a/src/performancetest/java/teetime/examples/traceReconstruction/ChwWorkTcpTraceReconstructionAnalysisTest.java +++ b/src/performancetest/java/teetime/examples/traceReconstruction/ChwWorkTcpTraceReconstructionAnalysisTest.java @@ -25,7 +25,7 @@ import org.junit.Before; import org.junit.Test; import teetime.util.StopWatch; -import util.StatisticsUtil; +import util.test.StatisticsUtil; /** * @author Christian Wulf diff --git a/src/performancetest/java/teetime/examples/traceReconstruction/ChwWorkTraceReconstructionAnalysisTest.java b/src/performancetest/java/teetime/examples/traceReconstruction/ChwWorkTraceReconstructionAnalysisTest.java index 335a6447b9889a5a9def1d7ac74bad6f7e9c89a9..c7438eca97eedc4c28fafb7f1a367556c18f2ff0 100644 --- a/src/performancetest/java/teetime/examples/traceReconstruction/ChwWorkTraceReconstructionAnalysisTest.java +++ b/src/performancetest/java/teetime/examples/traceReconstruction/ChwWorkTraceReconstructionAnalysisTest.java @@ -31,7 +31,7 @@ import org.junit.Before; import org.junit.Test; import teetime.util.StopWatch; -import util.StatisticsUtil; +import util.test.StatisticsUtil; import kieker.analysis.plugin.filter.flow.TraceEventRecords; diff --git a/src/performancetest/java/teetime/examples/traceReconstruction/NieWorkKiekerTraceReconstructionAnalysisTest.java b/src/performancetest/java/teetime/examples/traceReconstruction/NieWorkKiekerTraceReconstructionAnalysisTest.java index 77c352fc7becada7f933b90985db786275fb4c07..daa1b9aef5fdadbe13c7aa30480c5285d8d9c46f 100644 --- a/src/performancetest/java/teetime/examples/traceReconstruction/NieWorkKiekerTraceReconstructionAnalysisTest.java +++ b/src/performancetest/java/teetime/examples/traceReconstruction/NieWorkKiekerTraceReconstructionAnalysisTest.java @@ -31,7 +31,7 @@ import org.junit.Before; import org.junit.Test; import teetime.util.StopWatch; -import util.StatisticsUtil; +import util.test.StatisticsUtil; import kieker.analysis.plugin.filter.flow.TraceEventRecords; diff --git a/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/ChwHomeTcpTraceReconstructionAnalysisWithThreadsTest.java b/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/ChwHomeTcpTraceReconstructionAnalysisWithThreadsTest.java index 1b969f1c364f7ac3057a6a89bbcb458439d14e75..5e3af5a5935d97cb2dd7e6ea0dfd37712327b1ba 100644 --- a/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/ChwHomeTcpTraceReconstructionAnalysisWithThreadsTest.java +++ b/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/ChwHomeTcpTraceReconstructionAnalysisWithThreadsTest.java @@ -36,7 +36,7 @@ import teetime.framework.Analysis; import teetime.framework.pipe.SpScPipe; import teetime.util.ListUtil; import teetime.util.StopWatch; -import util.StatisticsUtil; +import util.test.StatisticsUtil; /** * @author Christian Wulf diff --git a/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/ChwWorkTcpTraceReconstructionAnalysisWithThreadsTest.java b/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/ChwWorkTcpTraceReconstructionAnalysisWithThreadsTest.java index 99e8e04bf50349e97abce274dce041e8fa162566..3082beaf4fc092e57df7728ec4c9c55ab0fce79f 100644 --- a/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/ChwWorkTcpTraceReconstructionAnalysisWithThreadsTest.java +++ b/src/performancetest/java/teetime/examples/traceReconstructionWithThreads/ChwWorkTcpTraceReconstructionAnalysisWithThreadsTest.java @@ -31,7 +31,7 @@ import teetime.framework.Analysis; import teetime.framework.pipe.SpScPipe; import teetime.util.ListUtil; import teetime.util.StopWatch; -import util.StatisticsUtil; +import util.test.StatisticsUtil; /** * @author Christian Wulf diff --git a/src/performancetest/java/teetime/examples/traceReductionWithThreads/ChwWorkTcpTraceReductionAnalysisWithThreadsTest.java b/src/performancetest/java/teetime/examples/traceReductionWithThreads/ChwWorkTcpTraceReductionAnalysisWithThreadsTest.java index 41d1eab09b2687654a7aaf7b3adf2c41c8e23984..d7b58674de3cbc73deaac48deef643a4c7d80d2e 100644 --- a/src/performancetest/java/teetime/examples/traceReductionWithThreads/ChwWorkTcpTraceReductionAnalysisWithThreadsTest.java +++ b/src/performancetest/java/teetime/examples/traceReductionWithThreads/ChwWorkTcpTraceReductionAnalysisWithThreadsTest.java @@ -32,7 +32,7 @@ import org.junit.runners.MethodSorters; import teetime.util.ListUtil; import teetime.util.StopWatch; import util.MooBenchStarter; -import util.StatisticsUtil; +import util.test.StatisticsUtil; /** * @author Christian Wulf diff --git a/src/performancetest/java/teetime/util/StopWatchTest.java b/src/performancetest/java/teetime/util/StopWatchTest.java index 6ecf46a044916001a12de21e3c606b40ef4e89d9..5c0a6a0d721e27e2c44694115ce2b40576e27ec3 100644 --- a/src/performancetest/java/teetime/util/StopWatchTest.java +++ b/src/performancetest/java/teetime/util/StopWatchTest.java @@ -7,7 +7,7 @@ import java.util.Map; import org.junit.Test; -import util.StatisticsUtil; +import util.test.StatisticsUtil; public class StopWatchTest {