commit
23ee5dce00
BIN
7ff584954008.tar.bz2
Normal file
BIN
7ff584954008.tar.bz2
Normal file
Binary file not shown.
124
jmh.spec
Normal file
124
jmh.spec
Normal file
@ -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 <maminjie1@huawei.com> - 1.13-1
|
||||||
|
- package init
|
||||||
4
jmh.yaml
Normal file
4
jmh.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: hg
|
||||||
|
src_repo: http://hg.openjdk.java.net/code-tools/jmh
|
||||||
|
tag_prefix: ^
|
||||||
|
seperator: "."
|
||||||
145
jopt-simple.patch
Normal file
145
jopt-simple.patch
Normal file
@ -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 @@
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.jopt-simple</groupId>
|
||||||
|
<artifactId>jopt-simple</artifactId>
|
||||||
|
- <version>4.6</version>
|
||||||
|
+ <version>5.0.4</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
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<Integer> valueType() {
|
||||||
|
+ public Class<? extends Integer> 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<Integer> valueType() {
|
||||||
|
+ public Class<? extends Integer> 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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user