One method is to use Apache to time the request. I use the following:
# %D = microseconds
LogFormat "%h %t \"%r\" %>s %D" time
CustomLog logs/time_log time
Which will create a file in your logs directory called time_log, which logs the total time for each request in microseconds.
Obviously, when trying to time stuff:
- Do it on an otherwise idle machine
- Repeat the test a number of times and take the average or something
- Don't run the web browser on the same machine! The browser and server fight over CPU which distorts results.
So ensure that your test server and test clients are different physical machines, and that your test server is otherwise idle.
Mark