In a typical multi-tier web application, how to measure the response time from when the server receive the request to the time server send out the response? I want focus on the server side performance, so I do NOT want to include the time the response spent at the internet.
The trouble is that web server logs usually logs response time which include the network time. For example in IIS, the "time taken" field in the access log reports the time when the server receive the request to the time server receive the acknowledge of response from the end user, see this MSDN article for more detail.
Are there any monitoring tool or server configuration to enable such measurement?
Run a network capture on the server and look at the time the server recieved the request and compare it to the time it responded to the request. That will show you when the request hit the network stack on the server and when it left the network stack, which should be a rough approximation of how fast the server is processing the request.
The testing/sampling should take place with the least amount of intermediate networking as much as possible to isolate/eliminate the network latency timing affects.
As for testing tools, Mercury Interactive has some very good tools. They have since been purchased by HP, so you might look there to see what is currently available.
Just add logging within your application to measure the time involved in whatever part of the entire service cycle you want to measure. Good frameworks do this for you automatically.