Skip to main content

All Questions

Tagged with
0 votes
0 answers
68 views

Why is my maven generate command for JMH generating POMs and a Java class which contain errors?

I am using the following code: mvn archetype:generate -DinteractiveMode=false -DarchetypeGroupId=org.openjdk.jmh -DarchetypeArtifactId=jmh-java-benchmark-archetype -DgroupId=org.sample -DartifactId=...
trackpadbad's user avatar
4 votes
0 answers
1k views

Is it possible to use JMH with JDK 17?

Currently using trying to use JMH 1.33 with JDK 17. However, invoking JMH programatically seems to use sun.mis.Unsafe. Since 1.33 is the latest version of JMH, it therefore seems like it is impossible ...
Dyllon Gagnier's user avatar
1 vote
0 answers
291 views

JMH + Maven. BenchmarkList gets in wrong JAR

I've encountered a little problem with a project that I considered finished. It includes three parts -- the main class for which the whole project was created (a quadruple-precision floating-point ...
m. vokhm's user avatar
  • 689
1 vote
1 answer
731 views

How to import jmh in IDEA(JDK15)

how to config the jmh in IDEA the tutorial I followed: https://www.baeldung.com/java-microbenchmark-harness I use the JDK 15 ,after I import relative dependency still got a error But I heard that ...
Cyberlin's user avatar
  • 315
0 votes
2 answers
450 views

Benchmarking my neural network with JMH, but how do I mix my maven dependencies?

I followed this guide (http://tutorials.jenkov.com/java-performance/jmh.html) and have opened a new project with that class MyBenchmark which looks like this: package com.jenkov; import org.openjdk....
The Good One's user avatar
3 votes
0 answers
426 views

JMH - ERROR: Unable to find the resource: /META-INF/BenchmarkList

When using JMH with maven to benchmark a project that was previously working and benchmarking as intended experiencing the following error: java -jar target/benchmarks.jar Exception in thread "...
Jack Goodwin's user avatar
0 votes
2 answers
809 views

Annotation processor for JMH is not working. How can I investigate the reason?

I recently joined the company and need to add jmh tests. I created a test project and add simple jmh test there, it runs. But when I move my test, dependencies and maven-shade-plugin to my work ...
a3dsfcv's user avatar
  • 1,274
0 votes
0 answers
142 views

Creating from jmh archetype fails with NoClassDefFoundError for commons-lang StringUtils class

I've used JMH in the past, and I've always started from the archetype. Today, I just ran mvn archetype:generate -DinteractiveMode=false -DarchetypeGroupId=org.openjdk.jmh -DarchetypeArtifactId=jmh-...
David M. Karr's user avatar
1 vote
0 answers
38 views

Unable to use maven for creating a jmh benchmark [duplicate]

By following the commands from this official guide, I tried to create two benchmarks under OpenJDK 8 & 9. Yet, the results were unsuccessful as shown below. I'm a total newbie to this maven thing, ...
eca2ed291a2f572f66f4a5fcf57511's user avatar
3 votes
2 answers
5k views

Could not resolve dependencies for project org.openjdk.jmh:jmh-core:jar:1.21

Wanted to start doing benchmark of methods that i will write from now onward, Had motivation from a long time and finally decided to do so from yesterday. But i have been struck with my setup process. ...
Vishwa Ratna's user avatar
  • 6,260
4 votes
1 answer
5k views

JMH doesn't run inside a Java Module (Unable to find the resource: /META-INF/BenchmarkList)

I took a project that uses maven-surefire-plugin (automated tests) to trigger JMH benchmarks and added module-info.java to it. Now, META-INF/BenchmarkList is no longer getting generated (in fact, the ...
Gili's user avatar
  • 89.1k
9 votes
2 answers
3k views

Error: Could not find or load main class org.openjdk.jmh.runner.ForkedMain

I am benchmarking some methods using jmh through a spring boot application. When i run it through IDE it gives me benchmarks but when i package it with maven and run it through CMD it gives the below ...
sn879's user avatar
  • 183
3 votes
1 answer
2k views

Flink Error: Could not find or load main class

I'm trying to run those Flink Benchmarks: https://github.com/dataArtisans/flink-benchmarks I've generated the jar file using maven with that command: mvn clean package -Pbuild-jar Then I'm trying ...
Orion Papadakis's user avatar
0 votes
0 answers
425 views

java.lang.ClassFormatError error in JMH Maven project

I am trying to create a project for micro benchmarking Java code using JMH. I am following the steps mentioned in this tutorial. I created the project using the following Maven command. mvn ...
bisarch's user avatar
  • 1,398
2 votes
0 answers
751 views

How does one use JMH from a Scala Maven project in a JUnit test?

I created a complete test project (version in question linked). I have based this project on several things: The original java repository of the same demo Generating an archetype, e.g.: mvn ...
bbarker's user avatar
  • 12.8k

15 30 50 per page