diff --git a/7ff584954008.tar.bz2 b/7ff584954008.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..b1115f4aadd81825a240f26a1509afdc48fbcaef Binary files /dev/null and b/7ff584954008.tar.bz2 differ diff --git a/jmh.spec b/jmh.spec new file mode 100644 index 0000000000000000000000000000000000000000..aff0633ceb2fd7e5041e00910d9f94118915b9ac --- /dev/null +++ b/jmh.spec @@ -0,0 +1,124 @@ +%global hghash 7ff584954008 + +Name: jmh +Version: 1.13 +Release: 1 +Summary: Java Microbenchmark Harness +License: GPLv2 with exceptions +URL: http://openjdk.java.net/projects/code-tools/jmh/ +Source0: http://hg.openjdk.java.net/code-tools/jmh/archive/%{hghash}.tar.bz2 +# Patch for jopt-simple >= 5 +Patch0: jopt-simple.patch + +BuildRequires: maven-local mvn(junit:junit) mvn(net.sf.jopt-simple:jopt-simple) >= 5 +BuildRequires: mvn(org.apache.commons:commons-math3) +BuildRequires: mvn(org.apache.maven.plugins:maven-site-plugin) mvn(org.ow2.asm:asm) +Requires: mvn(net.sf.jopt-simple:jopt-simple) >= 5 +BuildArch: noarch + +%description +The JMH is a Java harness for building, running, and analysing +nano/micro/macro benchmarks written in Java and other languages +targeting the JVM. + +%package core-benchmarks +Summary: JMH Core Benchmarks +%description core-benchmarks +JMH Core Benchmarks. + +%package generator-annprocess +Summary: JMH Generators: Annotation Processors +%description generator-annprocess +JMH benchmark generator, based on annotation processors. + +%package generator-asm +Summary: JMH Generators: ASM +%description generator-asm +JMH benchmark generator, based on ASM bytecode manipulation. + +%package generator-bytecode +Summary: JMH Generators: Bytecode +%description generator-bytecode +JMH benchmark generator, based on byte-code inspection. + +%package generator-reflection +Summary: JMH Generators: Reflection +%description generator-reflection +JMH benchmark generator, based on reflection. + +%package parent +Summary: Java Microbenchmark Harness Parent POM +%description parent +Java Microbenchmark Harness Parent POM. + +%package samples +Summary: JMH Samples +License: BSD +%description samples +JMH Samples. + +%package javadoc +Summary: Javadoc for %{name} +License: BSD and GPLv2 with exceptions +%description javadoc +This package contains javadoc for %{name}. + +%prep +%setup -q -n %{name}-%{hghash} +%patch0 -p1 +%pom_disable_module %{name}-archetypes +%pom_disable_module %{name}-core-ct +%pom_disable_module %{name}-core-it +%pom_remove_plugin -r :maven-eclipse-plugin +%pom_remove_plugin -r :maven-license-plugin +%pom_remove_plugin -r :maven-shade-plugin +%pom_remove_plugin -r :maven-source-plugin +%pom_remove_plugin -r :maven-javadoc-plugin +%pom_xpath_remove "pom:build/pom:extensions" %{name}-core +rm -r %{name}-core/src/test/java/org/openjdk/jmh/results/format/ResultFormatTest.java +for s in $(find %{name}-samples -name "*.java") \ + %{name}-core-benchmarks/src/main/java/org/openjdk/jmh/validation/tests/BlackholeConsumeCPUTest.java \ + %{name}-core-benchmarks/src/main/java/org/openjdk/jmh/validation/tests/BlackholeConsecutiveTest.java \ + %{name}-core-benchmarks/src/main/java/org/openjdk/jmh/validation/tests/BlackholeSingleTest.java \ + %{name}-core-benchmarks/src/main/java/org/openjdk/jmh/validation/tests/BlackholePipelinedTest.java \ + %{name}-core-benchmarks/src/main/java/org/openjdk/jmh/validation/IterationScoresFormatter.java ;do + native2ascii -encoding UTF8 ${s} ${s} +done +sed -i "s,59,51,;s,Temple Place,Franklin Street,;s,Suite 330,Fifth Floor,;s,02111-1307,02110-1301," src/license/gpl_cpe/license.txt + +%build +%mvn_build -s + +%install +%mvn_install + +%files -f .mfiles-%{name}-core +%license %{name}-core/LICENSE + +%files core-benchmarks -f .mfiles-%{name}-core-benchmarks +%license %{name}-core-benchmarks/LICENSE + +%files generator-annprocess -f .mfiles-%{name}-generator-annprocess +%license %{name}-generator-annprocess/LICENSE + +%files generator-asm -f .mfiles-%{name}-generator-asm +%license %{name}-generator-asm/LICENSE + +%files generator-bytecode -f .mfiles-%{name}-generator-bytecode +%license %{name}-generator-bytecode/LICENSE + +%files generator-reflection -f .mfiles-%{name}-generator-reflection +%license %{name}-generator-reflection/LICENSE + +%files parent -f .mfiles-%{name}-parent +%license LICENSE src/license/* + +%files samples -f .mfiles-%{name}-samples +%license %{name}-samples/LICENSE src/license/bsd/* + +%files javadoc -f .mfiles-javadoc +%license LICENSE src/license/* + +%changelog +* Tue Aug 11 2020 maminjie - 1.13-1 +- package init diff --git a/jmh.yaml b/jmh.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9b0051326cca7954e5a30f9018addceb0746f001 --- /dev/null +++ b/jmh.yaml @@ -0,0 +1,4 @@ +version_control: hg +src_repo: http://hg.openjdk.java.net/code-tools/jmh +tag_prefix: ^ +seperator: "." diff --git a/jopt-simple.patch b/jopt-simple.patch new file mode 100644 index 0000000000000000000000000000000000000000..e80bf2f0bc156ee724e00d41529c74a69bd44802 --- /dev/null +++ b/jopt-simple.patch @@ -0,0 +1,145 @@ +# HG changeset patch +# Date 1511260104 0 +# Tue Nov 21 10:28:24 2017 +0000 +# Node ID 731399becd960a450cf277916308dac52c1e2e93 +# Parent 7ff584954008f5dc877c590df5d902a0022f7456 +Upgrade to latest jopt-simple + +diff --git a/jmh-core/pom.xml b/jmh-core/pom.xml +--- a/jmh-core/pom.xml ++++ b/jmh-core/pom.xml +@@ -60,7 +60,7 @@ + + net.sf.jopt-simple + jopt-simple +- 4.6 ++ 5.0.4 + + + org.apache.commons +diff --git a/jmh-core/src/main/java/org/openjdk/jmh/runner/options/IntegerValueConverter.java b/jmh-core/src/main/java/org/openjdk/jmh/runner/options/IntegerValueConverter.java +--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/options/IntegerValueConverter.java ++++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/options/IntegerValueConverter.java +@@ -66,7 +66,7 @@ + } + + @Override +- public Class valueType() { ++ public Class valueType() { + return TO_INT_CONVERTER.valueType(); + } + +diff --git a/jmh-core/src/main/java/org/openjdk/jmh/runner/options/ThreadsValueConverter.java b/jmh-core/src/main/java/org/openjdk/jmh/runner/options/ThreadsValueConverter.java +--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/options/ThreadsValueConverter.java ++++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/options/ThreadsValueConverter.java +@@ -42,7 +42,7 @@ + } + + @Override +- public Class valueType() { ++ public Class valueType() { + return IntegerValueConverter.POSITIVE.valueType(); + } + +diff --git a/jmh-core/src/test/java/org/openjdk/jmh/runner/options/TestOptions.java b/jmh-core/src/test/java/org/openjdk/jmh/runner/options/TestOptions.java +--- a/jmh-core/src/test/java/org/openjdk/jmh/runner/options/TestOptions.java ++++ b/jmh-core/src/test/java/org/openjdk/jmh/runner/options/TestOptions.java +@@ -244,7 +244,7 @@ + new CommandLineOptions("-t", "0"); + Assert.fail(); + } catch (CommandLineOptionException e) { +- Assert.assertEquals("Cannot parse argument '0' of option ['t']. The given value 0 should be positive", e.getMessage()); ++ Assert.assertEquals("Cannot parse argument '0' of option t. The given value 0 should be positive", e.getMessage()); + } + } + +@@ -264,7 +264,7 @@ + new CommandLineOptions("-t", "-1"); + Assert.fail(); + } catch (CommandLineOptionException e) { +- Assert.assertEquals("Cannot parse argument '-1' of option ['t']. The given value -1 should be positive", e.getMessage()); ++ Assert.assertEquals("Cannot parse argument '-1' of option t. The given value -1 should be positive", e.getMessage()); + } + } + +@@ -274,7 +274,7 @@ + new CommandLineOptions("-t", "-42"); + Assert.fail(); + } catch (CommandLineOptionException e) { +- Assert.assertEquals("Cannot parse argument '-42' of option ['t']. The given value -42 should be positive", e.getMessage()); ++ Assert.assertEquals("Cannot parse argument '-42' of option t. The given value -42 should be positive", e.getMessage()); + } + } + +@@ -337,7 +337,7 @@ + new CommandLineOptions("-tg", "-1,-2"); + Assert.fail(); + } catch (CommandLineOptionException e) { +- Assert.assertEquals("Cannot parse argument '-1' of option ['tg']. The given value -1 should be non-negative", e.getMessage()); ++ Assert.assertEquals("Cannot parse argument '-1' of option tg. The given value -1 should be non-negative", e.getMessage()); + } + } + +@@ -395,7 +395,7 @@ + new CommandLineOptions("-wi", "-1"); + Assert.fail(); + } catch (CommandLineOptionException e) { +- Assert.assertEquals("Cannot parse argument '-1' of option ['wi']. The given value -1 should be non-negative", e.getMessage()); ++ Assert.assertEquals("Cannot parse argument '-1' of option wi. The given value -1 should be non-negative", e.getMessage()); + } + } + +@@ -439,7 +439,7 @@ + new CommandLineOptions("-i", "0"); + Assert.fail(); + } catch (CommandLineOptionException e) { +- Assert.assertEquals("Cannot parse argument '0' of option ['i']. The given value 0 should be positive", e.getMessage()); ++ Assert.assertEquals("Cannot parse argument '0' of option i. The given value 0 should be positive", e.getMessage()); + } + } + +@@ -515,7 +515,7 @@ + new CommandLineOptions("-opi", "0"); + Assert.fail(); + } catch (CommandLineOptionException e) { +- Assert.assertEquals("Cannot parse argument '0' of option ['opi']. The given value 0 should be positive", e.getMessage()); ++ Assert.assertEquals("Cannot parse argument '0' of option opi. The given value 0 should be positive", e.getMessage()); + } + } + +@@ -559,7 +559,7 @@ + new CommandLineOptions("-f", "-1"); + Assert.fail(); + } catch (CommandLineOptionException e) { +- Assert.assertEquals("Cannot parse argument '-1' of option ['f']. The given value -1 should be non-negative", e.getMessage()); ++ Assert.assertEquals("Cannot parse argument '-1' of option f. The given value -1 should be non-negative", e.getMessage()); + } + } + +@@ -598,7 +598,7 @@ + new CommandLineOptions("-wf", "-1"); + Assert.fail(); + } catch (CommandLineOptionException e) { +- Assert.assertEquals("Cannot parse argument '-1' of option ['wf']. The given value -1 should be non-negative", e.getMessage()); ++ Assert.assertEquals("Cannot parse argument '-1' of option wf. The given value -1 should be non-negative", e.getMessage()); + } + } + +@@ -678,7 +678,7 @@ + new CommandLineOptions("-bs", "0"); + Assert.fail(); + } catch (CommandLineOptionException e) { +- Assert.assertEquals("Cannot parse argument '0' of option ['bs']. The given value 0 should be positive", e.getMessage()); ++ Assert.assertEquals("Cannot parse argument '0' of option bs. The given value 0 should be positive", e.getMessage()); + } + } + +@@ -710,7 +710,7 @@ + new CommandLineOptions("-wbs", "0"); + Assert.fail(); + } catch (CommandLineOptionException e) { +- Assert.assertEquals("Cannot parse argument '0' of option ['wbs']. The given value 0 should be positive", e.getMessage()); ++ Assert.assertEquals("Cannot parse argument '0' of option wbs. The given value 0 should be positive", e.getMessage()); + } + } +