Forum Moderators: DixonJones

Message Too Old, No Replies

Response Time

         

sarika

7:20 am on Sep 9, 2005 (gmt 0)

10+ Year Member



Hi,
I want to find out server response time.
when user clicks on particular button which queries database,i need to find out server response time in such cases.
Any suggesion would be of gr8 help.
Thanx
Sarika

Receptional

12:22 pm on Sep 9, 2005 (gmt 0)



Yep - you can test server response rates freely through many web sites.

Try something like "website speed test" in your favourite search engine.

Dixon.

sarika

12:38 pm on Sep 9, 2005 (gmt 0)

10+ Year Member



hi
i want to do this programmatically for my web statistics project

Regards,
Sarika

dcrombie

2:11 pm on Sep 9, 2005 (gmt 0)



Yes, but what do you actually want to measure?

A 'button click' doesn't execute a query. It (normally) takes the browser to another address, which loads a page, which at some point calls a script which talks to the database and executes a query, returns some result which is output on the page.

The standard way for measuring execution time is to set a timestamp (using microtime) when the execution starts, and comparing it to another timestamp when it finishes. The difference is the execution time.

However, a good SQL database will let you find this out directly without having to use any external scripting.

ronburk

5:10 pm on Sep 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hard to say exactly what you're trying to do, but if you want to get acquainted with some of the many technical issues involved in trying to benchmark a web server's response times, I recommend Googling for
"httperf". You should be able to find both source code for the tool, and a research report that discusses performance measuring issues.

sarika

12:06 pm on Sep 12, 2005 (gmt 0)

10+ Year Member



Actually am developing common application which will generate web statistics report for different application using log files maintained by those applications.
Application will give max used pages,least used pages,page load time etc.
One of the reports generated by this web statistics application is response time.
By "Response time" what i meant is time taken to return resultset to particular request.
so if number of records are getting displayed in a resultgrid when particular button is clicked ,no of records may vary depending upon the conditions specifying and hence time taken to display record will also change accordingly.Also network traffic may add to the time records actually get displayed on page.This response time i need to measure.
As am developing common application in .net i have written function in validation module which will make entries in log file when particular page in an application is visited.
Similar way i need to write a common function for calculating response time also so tht individual pages of applications need not be accessed for calculating response time.

larryn

4:43 pm on Sep 12, 2005 (gmt 0)

10+ Year Member



sarika,

If you are using .Net on IIS, you can configure the logging module to give you all sorts of extra information, including time taken to service a request. I'd suggest you check the IIS Logging docs at

[microsoft.com ]

Larry

BradleyT

10:04 pm on Sep 15, 2005 (gmt 0)

10+ Year Member



if you use vb.net you can use this. Put start immediately before the line that starts and finish immediately after the line that finishes.

Dim test1, test2, test3 As Double

' Start '
test1 = DateTime.Now.TimeOfDay.TotalMilliseconds

' Finish '
test2 = DateTime.Now.TimeOfDay.TotalMilliseconds

test3 = test2 - test1
Response.Write("Finished in " & Math.Round((test3 / 1000), 2) & " seconds.")