Partial RE for Benchmark Tests
Eckenfels. Bernd
B.Eckenfels at seeburger.de
Fri Aug 22 00:40:11 UTC 2014
Hello,
as discussed before I propose to change the benchmark name filter from a all-match to a regular expression pattern find. This is a very small code change. The TestBenchmarkList is currently @Ignored because (I think) the test input file is in a old/wrong format.
I changed the BenchmarkList file by adding some (random) benchmark parameters to make it comply the line format. Currently the tests all work on the user-visible benchmark name of these lines, so it doesn't really matter what's in the remaining 19 args. But keep that in mind if testing for more features will be added.
In addition to actually enabling the tests again I also added some test cases around ^$ as well as lists, the empty list case and the "typical" '.' abuse case.
All the tests (including IT) pass with my modification.
Here is a sample usage, which shows you don't need .* for substrings (but you can still use it)
jmh\jmh-core-benchmarks\target>java -jar benchmarks.jar -l Int
Benchmarks:
org.openjdk.jmh.benchmarks.BlackholeBench.explicit_testInt
org.openjdk.jmh.benchmarks.BlackholeBench.implicit_testInt
org.openjdk.jmh.benchmarks.BlackholePipelineBench.test_Int_1
org.openjdk.jmh.benchmarks.BlackholePipelineBench.test_Int_10
org.openjdk.jmh.benchmarks.BlackholePipelineBench.test_Int_100
org.openjdk.jmh.benchmarks.BlackholePipelineBench.test_Int_1000
jmh\jmh-core-benchmarks\target>java -jar benchmarks.jar -l Int -e BlackholeBench
Benchmarks:
org.openjdk.jmh.benchmarks.BlackholePipelineBench.test_Int_1
org.openjdk.jmh.benchmarks.BlackholePipelineBench.test_Int_10
org.openjdk.jmh.benchmarks.BlackholePipelineBench.test_Int_100
org.openjdk.jmh.benchmarks.BlackholePipelineBench.test_Int_1000
jmh\jmh-core-benchmarks\target>java -jar benchmarks.jar -l Int$
Benchmarks:
org.openjdk.jmh.benchmarks.BlackholeBench.explicit_testInt
org.openjdk.jmh.benchmarks.BlackholeBench.implicit_testInt
jmh\jmh-core-benchmarks\target>java -jar benchmarks.jar -l .*Object.*
Benchmarks:
org.openjdk.jmh.benchmarks.BlackholeBench.explicit_testObject
org.openjdk.jmh.benchmarks.BlackholeBench.implicit_testObject
There is one thing unclear, the exclude pattern is matched against the while line, not only the user visible benchmark name, is this intentional - the verbose statement contradicts this somewhat.
This is my account where we have submitted a contributors agreement, feel free to use the patch or let me know what should be improved.
Greetings
Bernd
--
www.seeburger.com
SEEBURGER AG Vorstand/Seeburger Executive Board:
Sitz der Gesellschaft/Registered Office: Bernd Seeburger, Axel Haas, Michael Kleeberg
Edisonstr. 1
D-75015 Bretten Vorsitzender des Aufsichtsrats/Chairperson of the Seeburger Supervisory Board:
Tel.: 07252 / 96 - 0 Dr. Franz Scherer
Fax: 07252 / 96 - 2222
Internet: http://www.seeburger.de Registergericht/Commercial Register:
e-mail: info at seeburger.de HRB 240708 Mannheim
Dieses E-Mail ist nur für den Empfänger bestimmt, an den es gerichtet ist und kann vertrauliches bzw. unter das Berufsgeheimnis fallendes Material enthalten. Jegliche darin enthaltene Ansicht oder Meinungsäußerung ist die des Autors und stellt nicht notwendigerweise die Ansicht oder Meinung der SEEBURGER AG dar. Sind Sie nicht der Empfänger, so haben Sie diese E-Mail irrtümlich erhalten und jegliche Verwendung, Veröffentlichung, Weiterleitung, Abschrift oder jeglicher Druck dieser E-Mail ist strengstens untersagt. Weder die SEEBURGER AG noch der Absender (Eckenfels. Bernd) übernehmen die Haftung für Viren; es obliegt Ihrer Verantwortung, die E-Mail und deren Anhänge auf Viren zu prüfen.
This email is intended only for the recipient(s) to whom it is addressed. This email may contain confidential material that may be protected by professional secrecy. Any fact or opinion contained, or expression of the material herein, does not necessarily reflect that of SEEBURGER AG. If you are not the addressee or if you have received this email in error, any use, publication or distribution including forwarding, copying or printing is strictly prohibited. Neither SEEBURGER AG, nor the sender (Eckenfels. Bernd) accept liability for viruses; it is your responsibility to check this email and its attachments for viruses.
More information about the jmh-dev
mailing list