Run JMH benchmark under Eclipse

后端 未结 1 1152
礼貌的吻别
礼貌的吻别 2021-02-15 02:02

I\'m trying to get started with JMH under Eclipse. I can build a jar to execute from the command line but would also like me be able to run it directly within Eclipse for ease o

相关标签:
1条回答
  • 2021-02-15 02:25

    I run JMH tests in Eclipse all the time (for debug purposes), but I run maven build separately before running tests, while tests are executed as a Java application:

    Step 1: build Maven project

    1. Right click on project,
    2. Select Run As,
    3. Select Maven Build and specify goals as clean install

    (this step can also be done in command line by running the same goals)

    Step 2: run tests

    1. Right click on project,
    2. Select Run As,
    3. Select Java Application and choose either Main - org.openjdk.jmh or the main you created
    0 讨论(0)
提交回复
热议问题