From cc2ac5b43f2b3a81b1f6f9fc34b8fc846fc9ed07 Mon Sep 17 00:00:00 2001 From: Stuart Monteith Date: Tue, 23 Aug 2016 14:23:53 +0100 Subject: Populate with initial settings Create contents of JMH benchmark repository. Populate repository with real benchmarks in subsequent commits. --- pom.xml | 178 ++++++++++++++++++++++++++++++ src/main/java/org/sample/MyBenchmark.java | 44 ++++++++ 2 files changed, 222 insertions(+) create mode 100644 pom.xml create mode 100644 src/main/java/org/sample/MyBenchmark.java diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..e3419bd --- /dev/null +++ b/pom.xml @@ -0,0 +1,178 @@ + + + 4.0.0 + + jmh-parent + org.openjdk.jmh + 1.13-SNAPSHOT + + + org.sample + jmh-linaro-org + 1.0 + jar + + JMH benchmark sample: Java + + + + + 3.0 + + + + + org.openjdk.jmh + jmh-core + ${jmh.version} + + + org.openjdk.jmh + jmh-generator-annprocess + ${jmh.version} + provided + + + + + UTF-8 + + + 1.13 + + + 1.8 + + + benchmarks + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + ${javac.target} + ${javac.target} + ${javac.target} + + + + org.apache.maven.plugins + maven-shade-plugin + 2.2 + + + package + + shade + + + ${uberjar.name} + + + org.openjdk.jmh.Main + + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + + + + + + maven-clean-plugin + 2.5 + + + maven-deploy-plugin + 2.8.1 + + + maven-install-plugin + 2.5.1 + + + maven-jar-plugin + 2.4 + + + maven-javadoc-plugin + 2.9.1 + + + maven-resources-plugin + 2.6 + + + maven-site-plugin + 3.3 + + + maven-source-plugin + 2.2.1 + + + maven-surefire-plugin + 2.17 + + + + + + diff --git a/src/main/java/org/sample/MyBenchmark.java b/src/main/java/org/sample/MyBenchmark.java new file mode 100644 index 0000000..b8a86b3 --- /dev/null +++ b/src/main/java/org/sample/MyBenchmark.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2014, Oracle America, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of Oracle nor the names of its contributors may be used + * to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.sample; + +import org.openjdk.jmh.annotations.Benchmark; + +public class MyBenchmark { + + @Benchmark + public void testMethod() { + // This is a demo/sample template for building your JMH benchmarks. Edit as needed. + // Put your benchmark code here. + } + +} -- cgit v1.2.3