Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move benchmarks to test part #8

Open
burmanm opened this issue Apr 25, 2017 · 2 comments
Open

Move benchmarks to test part #8

burmanm opened this issue Apr 25, 2017 · 2 comments

Comments

@burmanm
Copy link
Owner

burmanm commented Apr 25, 2017

The Benchmark parts are still residing in the main/ section of the source code, while they should be in the test. This causes the jmh-libraries and all its subdependencies to flow to implementing programs.

@marcin-sumologic
Copy link

marcin-sumologic commented Aug 19, 2021

image

In short your library includes BenchmarkList file, if you include your project as a dependency in a JMH test it will break the JMH with error:

Exception in thread "main" java.lang.IllegalArgumentException: The length should be multiple of 8
        at org.openjdk.jmh.util.lines.Armor.decode(Armor.java:110)
        at org.openjdk.jmh.util.lines.TestLineReader.readArmoredString(TestLineReader.java:70)
        at org.openjdk.jmh.util.lines.TestLineReader.nextOptionalParamCollection(TestLineReader.java:184)
        at org.openjdk.jmh.runner.BenchmarkListEntry.<init>(BenchmarkListEntry.java:129)
        at org.openjdk.jmh.runner.BenchmarkList.find(BenchmarkList.java:135)
        at org.openjdk.jmh.runner.Runner.internalRun(Runner.java:260)
        at org.openjdk.jmh.runner.Runner.run(Runner.java:209)
        at org.openjdk.jmh.Main.main(Main.java:71)

at least when use use JMH 1.2x.

@burmanm
Copy link
Owner Author

burmanm commented Aug 19, 2021

This is probably something that has changed with the newer JMH versions. The BenchmarkList file is created by JMH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants