Loads is built in a way that makes it possible to have runners written in different languages. It’s perfectly possible to have a runner in javascript or ruby, sending data to loads.
This is made possible by the use of zeromq to send inter-process (or even inter-machines!) messages.
This means you can write your load tests with whatever language you want, as long as the test-runner sends back its results in the zmq pipeline, respecting the format described in this document.
The messages sent to loads always contain a data_type key, which describes the type of that that’s being sent.
The messages respect the following rules:
A message generally looks like this:
{
data_type: 'something',
worker_id: '1',
other_key_1: 'foo'
other_key_2: 'bar'
}
Some messages take a loads_status argument. loads_status is a list of values concerning the current status of the load. It contains, in this order:
When errors / exceptions are caught, they are serialised and sent trough the wire, as well. When you see an exc *, it is a list containing this:
Before and after you run the tests, you need to tell that you’re doing so:
When using loads, you usually run a test suite. Tests start, stop, succeed and fail. Here are the APIs you can use:
To track requests, you only have one method, named “add_hit” with the following parameters:
If you’re also able to track what’s going on with the socket connections, then you can use the following messages: