GSoC - Loadtest module

2 comments

As some of you know, I did Google's Summer of Code this summer. The result of that ended up being the loadtest module. This entry is basically just a description of how to use the module... so if you're not interested, please move along :-P.

The first part of this module lets you define and configure "states" for your site that you can run tests against.

You can use these states in two different ways:

  1. When running a loadtest, using the loadtest module, you can choose the state you wish to test.
  2. If you want to run more comprehensive tests using an external application such as ab, you can switch between states remotely allowing you to more easily script your benchmark tests.

The following screenshot is of the main testing interface. Each part of this form is described below.

  • The label is used for you to identify your test run at a later date. Each label will automatically have the timestamp for the test run appended to it.
  • A test suite is the "type" of test to run. By default there are two: "Single run", which just runs the selected tests once and "Test individual modules" which autotmatically disables all of the modules and then enables each module one at a time running tests at each step. Test suites can be added by module programmers as well so they can build tests that are more suited to their specific modules.
  • You can select a state from any of your pre-configured states. Leaving this empty will simply use the sites current settings.
  • There are currently two default tests that are included with the module:
    1. RequestRandomNodes - which does just that, page requests on random nodes. This is mostly just for testing, not overly useful for running load tests as you would probably want to compare test runs against identical page requests.
    2. RequestPages - This test requests a set of select pages a certain number of times. By default the pages "frontpage" and "tracker" are requested 10 times.

Unlike simpletest tests, loadtest tests can have individual configuration options that can be set through Drupal. The RequestPages test lets a user define which pages they want to request and how many times each page should be requested.

Depending on the options you choose running a test could take several minutes. Since site settings may be modified on the fly during a test run, it is important that you don't use this module on a production site, and don't interrupt it while it's running.

Finally, once the test has been run, you can view your statistics and compare multiple tests.

The code can be downloaded from the tarball on the module page, but I'd recommend taking it directly from CVS:

cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d loadtest contributions/modules/loadtest

Peanut Gallery

Load test. Tee hee hee

Load test. Tee hee hee hee.

I have nothing to say that is of redeeming value.

I know that most people who

Lynn

I know that most people who have read this far understand it completely but how do you interpret and compare the results? Is it based on time only?

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options