Performance Benchmarking

By Barnaby Golden, 30 June, 2014

Performance testing is often difficult and expensive to do. When you need to get real-World performance figures you need to test on real-World hardware and this is not always possible. Even when it can be achieved it is difficult to do frequently without a dedciated (and hence expensive) performance environment.

Performance benchmarking

An alternative to full-blown performance testing is performance benchmarking. When you benchmark you are interested in deltas rather than absolute values. A benchmark will not tell you the potential performance of a production system, but it will tell you if performance is increasing or declining during development.

The good thing about performance benchmarking is that it does not need to run on fancy servers. As long as you have a reasonable consistent hardware platform you can benchmark. Remember, it is trends you are interested in rather than absolute values.

Test environments

What you will need to consider is how and where you want to run your tests. For example, will you run your tests on a dedicated benchmarking environment? Or perhaps you could use a development or testing environment? An alternative approach is to use your continuous integration or build server.

Benchmarking tools

One of my favourite tools for benchmarking of web applications is JMeter. This is an open source and easy to use web performance testing tool. There are good plugins for JMeter on Maven and on Jenkins so it is relatively easy to implement in continuous integration. I will often look to combine the Maven JMeter plugin with the Maven Jetty plugin. This allows you to run your benchmarks as just another integration test (or maybe as a Maven profile).

A good way to display the results of your JMeter testing is using the Jenkins Performance Plugin. This gives you a nice graph of the benchmarking performance over time and allows you to recognise performance trends.

An example of a simple JMeter based performance benchmark can be seen in this Github project.

 


 

 

Target Audience