diff --git a/perftest/.editorconfig b/perftest/.editorconfig new file mode 100644 index 0000000..1f494b0 --- /dev/null +++ b/perftest/.editorconfig @@ -0,0 +1,17 @@ +# Editor configuration, see http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true +max_line_length = 80 + +[*.sh] +end_of_line = lf + +[*.java] +indent_size = 4 +max_line_length = 120 diff --git a/perftest/.gitattributes b/perftest/.gitattributes new file mode 100644 index 0000000..8dfa1eb --- /dev/null +++ b/perftest/.gitattributes @@ -0,0 +1,2 @@ +# When shell scripts end in CRLF, bash gives a cryptic error message +*.sh text eol=lf diff --git a/perftest/.gitignore b/perftest/.gitignore new file mode 100644 index 0000000..7194620 --- /dev/null +++ b/perftest/.gitignore @@ -0,0 +1,28 @@ +# +# Standard Maven .gitignore +# +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties + +# +# IntelliJ +# +*.iml +.idea/* +!.idea/runConfigurations/ + +# +# Visual Studio Code +# +.settings/ +.classpath +.factorypath +.project +.vscode/ diff --git a/perftest/.travis.yml b/perftest/.travis.yml new file mode 100644 index 0000000..8bdbb2f --- /dev/null +++ b/perftest/.travis.yml @@ -0,0 +1,4 @@ +language: java +jdk: openjdk8 +after_success: + - mvn coveralls:report diff --git a/perftest/pom.xml b/perftest/pom.xml new file mode 100644 index 0000000..e972c79 --- /dev/null +++ b/perftest/pom.xml @@ -0,0 +1,195 @@ + + 4.0.0 + nz.ac.massey.javaecs.examples + perftest + 1.0-SNAPSHOT + + 1.8 + 1.8 + UTF-8 + 5.6.0 + 3.0.0-M3 + 3.1.0 + 8.29 + 4.0.1 + 3.0.0-M4 + 0.8.4 + 3.0.0 + 4.3.0 + + 0% + 0% + 20 + 5 + + + + org.junit.jupiter + junit-jupiter-api + ${junit.version} + test + + + org.junit.jupiter + junit-jupiter-engine + ${junit.version} + test + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + ${maven-enforcer-plugin.version} + + + + enforce + + + + + 3.6.3 + + + true + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${maven-checkstyle-plugin.version} + + + com.puppycrawl.tools + checkstyle + ${checkstyle.version} + + + com.github.ngeor + checkstyle-rules + ${checkstyle-rules.version} + + + + com/github/ngeor/checkstyle.xml + true + ${skipTests} + + + + checkstyle + validate + + check + + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + org.jacoco + jacoco-maven-plugin + ${jacoco-maven-plugin.version} + + + pre-unit-test + + prepare-agent + + + + post-unit-test + test + + report + + + + check-unit-test + test + + check + + + ${project.build.directory}/jacoco.exec + + + BUNDLE + + + INSTRUCTION + COVEREDRATIO + ${jacoco.unit-tests.limit.instruction-ratio} + + + BRANCH + COVEREDRATIO + ${jacoco.unit-tests.limit.branch-ratio} + + + + + CLASS + + + COMPLEXITY + TOTALCOUNT + ${jacoco.unit-tests.limit.class-complexity} + + + + + METHOD + + + COMPLEXITY + TOTALCOUNT + ${jacoco.unit-tests.limit.method-complexity} + + + + + + + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + + + + + + travis + + + env.TRAVIS + + + + + + org.eluder.coveralls + coveralls-maven-plugin + ${coveralls-maven-plugin.version} + + + + + + diff --git a/perftest/src/main/java/nz/ac/massey/javaecs/examples/App.java b/perftest/src/main/java/nz/ac/massey/javaecs/examples/App.java new file mode 100644 index 0000000..664e4aa --- /dev/null +++ b/perftest/src/main/java/nz/ac/massey/javaecs/examples/App.java @@ -0,0 +1,23 @@ +package nz.ac.massey.javaecs.examples; + +import nz.ac.massey.javaecs.*; +import nz.ac.massey.javaecs.examples.Components.*; +import nz.ac.massey.javaecs.examples.Systems.*; + +/** + * Benchmark, + * A port of https://github.com/abeimler/ecs_benchmark + */ +public final class App { + private App() { + } + + /** + * Says hello to the world. + * @param args The arguments of the program. + */ + public static void main(String[] args) { + Engine engine = new Engine(); + System.out.println("Hello World!"); + } +} diff --git a/perftest/src/test/java/nz/ac/massey/javaecs/examples/AppTest.java b/perftest/src/test/java/nz/ac/massey/javaecs/examples/AppTest.java new file mode 100644 index 0000000..1978087 --- /dev/null +++ b/perftest/src/test/java/nz/ac/massey/javaecs/examples/AppTest.java @@ -0,0 +1,18 @@ +package nz.ac.massey.javaecs.examples; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +/** + * Unit test for simple App. + */ +class AppTest { + /** + * Rigorous Test. + */ + @Test + void testApp() { + assertEquals(1, 1); + } +}