General documentation about ab can be found at Apache Bench (ab)
Begin by performing a
in order to ensure your source tree is up-to-date.
Then, execute the following from the command line before applying your new patch. This will establish a baseline from which to judge performance improvements or decreases.
ab -c1 -n500 http://head.localhost/
The -c command specifies the number of concurrent requests and -n specifies the total number of page requests. In 99 out of 100 cases it is not necessary to specify a higher value than 1 for the concurrency. Increasing c will only put more stress on your server. This is useful if you want a general stress test, but it will falsify your results if you only want to test the impact of a particular patch on a particular Drupal page.
This will produce output similar to:
This is ApacheBench, Version 2.0.41-dev <$Revision: 220.127.116.11 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient).....done
Server Software: Apache/2.0.55
Server Hostname: localhost