timbre timbre
timbre timbre

Reputation: 13985

Using JMH as a framework for performance testing on functional/user level. Is it wrong?

I want to use JMH as a framework for performance testing on functional/user level for web application. Imagine me using JMH to, say, measure how long it takes from the moment when 100 users click "Post Your Question" on this site concurrently, to the moment when user sees their question posted.

Is this entirely wrong? What are the drawbacks of such approach?

Upvotes: 2

Views: 556

Answers (1)

timbre timbre
timbre timbre

Reputation: 13985

Now using this approach for approximately 6 months, I want to say that I still did not see any drawbacks. A few things I learned:

  • Even though on functional/user level of accuracy is lower, it's important to learn how various configuration parameters work (especially JVM-related, e.g. fork). They may influence how you build your tests, how do you run them, and what do you measure.
  • JMH is really lightweight and efficient, so comparing to the results obtained using other frameworks may not be valid (basically we saw 10-20% performance boost when running with JMH); I had to establish a new baseline.
  • JMH Jenkins plug-in helps with visualizing the results

Upvotes: 3

Related Questions