【JVM】JMH的使用(一)

时间:2025-03-30 15:30:00
<!--折叠不必要部分--> 1.引入2个依赖 <dependencies> <dependency> <groupId></groupId> <artifactId>jmh-core</artifactId> <version>${}</version> </dependency> <dependency> <groupId></groupId> <artifactId>jmh-generator-annprocess</artifactId> <version>${}</version> <scope>provided</scope> </dependency> </dependencies> <!--变量--> <properties> <>UTF-8</> <>1.25</> <>1.8</> <!--生成jar包名--> <>benchmarks</> </properties> <plugin> <groupId></groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.2.1</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <finalName>${}</finalName> <transformers> <transformer implementation=""> <mainClass></mainClass> </transformer> <transformer implementation=""/> </transformers> <filters> <filter> <artifact>*:*</artifact> <excludes> <exclude>META-INF/*.SF</exclude> <exclude>META-INF/*.DSA</exclude> <exclude>META-INF/*.RSA</exclude> </excludes> </filter> </filters> </configuration> </execution> </executions> </plugin>

相关文章