Introduction to Chronos

A lot of projects have huge performance problems. These problems typically manifest themselves as unpleasant surprises, when a solution is deployed into production, leading to miserable user experience, and long and stressful workdays for the developers, pulling their hair out in a desperate attempt to find and fix the problems.

Some large projects attempt to prevent this problem by inserting a large performance test phase shortly before launch. Most of them find huge performance problems - unfortunately it is now very expensive to fix problems with the architecture. Long nights and desperate patches may or may not solve the problems, but it will for sure be an unpleasant experience for the people involved.

Most projects are not even able to do that, so participants must cross their fingers and hope for the best when new features are launched into production. They might even succeed. Some projects don't.

The purpose of Chronos

There are several existing tools helping with performance testing, both open source (JMeter or Grinder) and commercial ones. One of them is Chronos. But it is taking another approach, applying agile principles of early feedback and continuous quality assurance.

The purpose of Chronos is NOT to be a comprehensive tool solving all your performance testing needs. Instead we attempt to make it easy to integrate performancetesting into your project early on in the project lifecycle. You may not find all problems, but hopefully you will find most problems, being able to fix them early on.

Once a performance test suite has been defined, Chronos allow you to run the performance test easily as part of your nightly build. Thus serious performance regressions have a chance of being found immediately after they are introduced.

Chronos is not a performance testing tool in itself, but reuses other tools (currently JMeter), letting them do the hard work. Chronos is not intended to replace other performance testing tools, but to supplement them. It is still advisable to perform serious performance testing at the end of development. Fortunately Chronos will have found most of the problems already, and the test scripts invoked by Chronos can be adjusted or reused as part of the final performance test suite.

Features of Chronos

Chronos enables you to test performance via JMeter, validate that relevant performance goals have been met, and create nice visualizations of the latest and historical testruns. The tests are being run as part of a Maven build, either continuously or ad hoc.

This will allow a developer to integrate performance testing into an existing project and performance test continuously, typically as a part of a nightly build. This will help him to pinpoint performance problems: If you know when a performance problem was introduced, it is much easier to find out which change in the codebase caused the performance degradation.

Currently only JMeter is supported, but the ambition is to extend this to other performance testing tools (Grinder).

The structure of Chronos

Chronos is logically separated into a testing and a reporting part (2 maven plugins).

The chronos-jmeter plugin is used for executing performance tests or to integrate results of already existing performance tests into the Chronos infrastructure. It may also be used for saving historical data, or for validating that performance goals have been met.

The chronos-report plugin uses the output from chronos-jmeter, to create current or historical reports.

When can I use Chronos?

Chronos is applicable for projects, where you are able to create performance tests in a format accepted by JMeter. This includes (but is not constrained to) http requests and test scripts developed either using Junit testcases or a JMeter Java API. The test scripts can invoke simple embedded business logic or send requests to a remote server.

When should I use Chronos?

Chronos should be considered for any project, where continuous performance testing is a good idea, typically projects still undergoing active development.

Chronos should also be considered for projects, where nice graphs of the performance test results are wanted. For really advanced graphs you might consider using the JMeter UI instead.

How do I introduce Chronos into my project?

  • Start by creating your performance tests, so they may be run JMeter This could be as Http request, or java-code calling a remote server or simple business logic.
  • (optional) Prepare initialization of test data, creating a suitable load for the database.
  • Use Chronos to invoke the initialization and the performance test, and visualize the test results, as part of your Maven build.