diff --git a/b/src/test/resources/log4j.properties b/b/src/test/resources/log4j.properties new file mode 100644 index 0000000..d8975af --- /dev/null +++ b/b/src/test/resources/log4j.properties @@ -0,0 +1,10 @@ +log4j.rootCategory=debug,console +log4j.logger=debug,console + +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.target=System.out +log4j.appender.console.immediateFlush=true +log4j.appender.console.encoding=UTF-8 + +log4j.appender.console.layout=org.apache.log4j.PatternLayout +log4j.appender.console.layout.conversionPattern=%d [%t] %-5p %c - %m%n \ No newline at end of file diff --git a/pom.xml b/pom.xml index 00967dc..7afbcce 100644 --- a/pom.xml +++ b/pom.xml @@ -1,66 +1,64 @@ - - - 4.0.0 - - org.quickperf - maven-test-bench - 1.0-SNAPSHOT - - - UTF-8 - 1.8 - 1.8 - - - - - org.apache.maven.shared - maven-verifier - 1.6 - test - - - org.quickperf - quick-perf-junit4 - 1.0.0-RC4 - test - - - junit - junit - 4.12 - test - - - net.lingala.zip4j - zip4j - 2.1.1 - - - commons-io - commons-io - 2.6 - - - org.apache.commons - commons-csv - 1.7 - - - com.github.oshi - oshi-core - 4.0.0 - - - - org.slf4j - slf4j-simple - 1.7.25 - - - + + + 4.0.0 + + org.quickperf + maven-test-bench + 1.0-SNAPSHOT + + + UTF-8 + 1.8 + 1.8 + + + + + org.apache.maven.shared + maven-verifier + 1.6 + test + + + org.quickperf + quick-perf-junit4 + 1.0.0-RC4 + test + + + junit + junit + 4.12 + test + + + net.lingala.zip4j + zip4j + 2.1.1 + + + commons-io + commons-io + 2.6 + + + org.apache.commons + commons-csv + 1.7 + + + com.github.oshi + oshi-core + 4.0.0 + + + org.slf4j + slf4j-log4j12 + 1.7.28 + test + + + \ No newline at end of file diff --git a/src/test/java/MvnValidateAllocationByMaven3VersionTest.java b/src/test/java/MvnValidateAllocationByMaven3VersionTest.java index 72748b4..82b825a 100644 --- a/src/test/java/MvnValidateAllocationByMaven3VersionTest.java +++ b/src/test/java/MvnValidateAllocationByMaven3VersionTest.java @@ -11,6 +11,8 @@ import org.quickperf.jvm.annotations.MeasureHeapAllocation; import org.quickperf.repository.LongFileRepository; import org.quickperf.repository.ObjectFileRepository; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.File; import java.io.FilenameFilter; @@ -22,6 +24,8 @@ import static org.junit.experimental.results.PrintableResult.testResult; public class MvnValidateAllocationByMaven3VersionTest { + + private Logger logger = LoggerFactory.getLogger(MvnValidateAllocationByMaven3VersionTest.class); @RunWith(QuickPerfJUnitRunner.class) public static class MvnValidate { @@ -71,7 +75,7 @@ public void execute_maven_validate() throws VerificationException { @Test public void measure() throws IOException { - + logger.debug("measure - start"); String dateTimeAsString = getDateTimeAsString(); String resultFilePath = buildAllocationCsvExportPath(dateTimeAsString); @@ -98,7 +102,7 @@ public void measure() throws IOException { } ExecutionContextTextExporter.INSTANCE.writeExecutionContextToTextFile(dateTimeAsString); - + logger.debug("measure - end"); } private void saveMavenVersion(Maven3Version maven3Version) { diff --git a/src/test/java/MvnValidateProfilingTest.java b/src/test/java/MvnValidateProfilingTest.java index 73efa70..30e4698 100644 --- a/src/test/java/MvnValidateProfilingTest.java +++ b/src/test/java/MvnValidateProfilingTest.java @@ -7,6 +7,8 @@ import org.quickperf.jvm.allocation.AllocationUnit; import org.quickperf.jvm.annotations.HeapSize; import org.quickperf.jvm.annotations.ProfileJvm; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.Collections; @@ -14,6 +16,8 @@ @RunWith(QuickPerfJUnitRunner.class) public class MvnValidateProfilingTest { + + private Logger logger = LoggerFactory.getLogger(MvnValidateProfilingTest.class); public static Maven3Version MAVEN_3_VERSION = Maven3Version.V_3_2_5; @@ -27,7 +31,9 @@ public class MvnValidateProfilingTest { @HeapSize(value = 6, unit = AllocationUnit.GIGA_BYTE) @Test public void execute_maven_validate() throws VerificationException { + logger.debug("execute_maven_validate - start"); verifier.executeGoals(validate); + logger.debug("execute_maven_validate - end"); } @Before