www.ThimbleOpenSource.com

ThimbleBench


What is it ?

It is simple useful HTTP benchmark. It was specifically designed for one purpose - measure performance of the same PHP scripts on different webservers (i.e. each webserver using different PHP version or configuration for application performance tuning)

Requirements

Both PHP5 and PHP4 should be OK.

Download

Complete source package can be downloaded from Downloads section

Installation

Just unzip files to some web directory. Edit config.php and then navigate your webbrowser to index.php. That's it.
And don't forget to make you $data_dir (test_data by default) writeable for your webserver.

Usage

ThimbleBench requests many times(configurable) specified URL(s) and expects that it will receive float number as output. Example of this script is in source package or you can look at it here:

<?php
$start_time = microtime(true);
//// Here we only sleep, but real application belongs here
usleep(rand(100000,300000));
/// Here we output our runtime as the only output
echo round((microtime(true) - $start_time), 3);
?>

Configuration

Config file config.php is documented and self explenatory. Here is short example of default configuration. You only need to change $tests array to suit your needs:

<?php
// $tests array syntax:
// $tests[$test_name]['urls'][$server_name] = 'url'

$tests = array();

$tests['example']['urls']['dev_server'] = 'http://www.thimbleopensource.com/examples/thimble_bench/example_server1.php';
$tests['example']['urls']['production_server'] = 'http://www.thimbleopensource.com/examples/thimble_bench/example_server2.php';
// for relevant results set to 10 - 100
$tests['example']['config']['requests'] = '10';
etc...

Usage

This type of benchmarking software is often used by large corporations where speed can make a big difference to whether customers complete their session or browse elsewhere.