Using jmh in eclipse

1.Eclipse installs the M2E-APT tool

2. Import projects and add dependencies to POM files

<!-- https://mvnrepository.com/artifact/org.openjdk.jmh/jmh-core -->
<dependency>
    <groupId>org.openjdk.jmh</groupId>
    <artifactId>jmh-core</artifactId>
    <version>1.23</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.openjdk.jmh/jmh-generator-annprocess -->
<dependency>
    <groupId>org.openjdk.jmh</groupId>
	<artifactId>jmh-generator-annprocess</artifactId>
	<version>1.23</version>
	<!-- <scope>test</scope> -->
	<scope>provided</scope>
</dependency>

3. Before execution, the project needs to run MVn-clean-install before running the benchmark test

Read More: