RE: Measuring URL response times

2005-08-10 Thread Karl
At 09:16 AM 8/10/05, Fabio wrote:
>You should give a try do GetTickCount() function.


THANK YOU FABIO!








-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.5/67 - Release Date: 8/9/05



~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214509
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Measuring URL response times

2005-08-10 Thread Fabio Terracini
You should give a try do GetTickCount() function.

Like



 code ...

#t1-GetTickCount()# ms

Or if you're planning to measure the overall page load time (not a 
specific code) in all your site you should look a specific tool for it, 
like Web Application Stress Tool.

--

Fabio Terracini
Synex Technologies Co.
Consultant
Fone/Fax: +55 (11) 3071-3363
[EMAIL PROTECTED]
www.synex.com.br 



Karl Simanonok wrote:

>I'd like to be able to measure the response times of thousands of various 
>URLs I have in a database.  This is one way:
>
>
>
>   
>
>  METHOD="GET"
>   resolveURL="1"
>   throwOnError="YES">
>   
>
>   
>
>   
>
>   Ping time: #TimeDiff# Milliseconds!
>
>
>
>The PROBLEM with this method is that the ColdFusion time functions only 
>allow resolution to the nearest second, so I get results like 0, 1000, 
>2000, 3000 etc., a very crude measurement when what I really want is 
>response time in milliseconds.
>
>
>Here is another way to to potentially solve the problem, from 
>http://www.tek-tips.com/viewthread.cfm?qid=1090810&page=3:
>
>
>
>
>   
>   
>   
>   
>   
>   timeout="5" outputfile="#dir##filename#">
>   
>   
>   
>   #ip#
>   
>   
>SUCCESS
>   
>-failed-
>   
>unknown
>   
>
>
>The PROBLEM with this second method is that it's got to be horribly 
>inefficient to repeatedly call Ping.exe with CFEXECUTE (and wait for four 
>replies), write a file, then read the file.  On top of it the output has to 
>be parsed up to get the final number of milliseconds that I really 
>want.  While this method could probably be made considerably more efficient 
>by skipping the file-writing and file-reading steps and just parsing the 
>output from CFEXECUTE, it's still ugly and kludgy to repeatedly call 
>Ping.exe this way, I'd sooner just get my results to the nearest second 
>with the first method.
>
>1) I'd very much like to be able to use CF by itself if possible; is there 
>any known way to use CF to get the time difference between two time hacks 
>in milliseconds?
>
>2) Secondly, because CF is limited in the number of simultaneous threads it 
>can handle (I'm using CF 5 although I could use MX 6 if I really had to), 
>what happens if thousands of CFHTTP requests are made this way very 
>quickly?  Does CF just stop and wait until there are threads available or 
>could so many CFHTTP requests lock up the server this app would be running 
>on?  I suppose I could throttle down the request rate if I had to, there 
>isn't any reason why thousands of CFHTTP requests have to be made all in 
>one batch.  So I guess this question boils down to: what would be the 
>maximum number of CFHTTP requests that I should burden the server with at 
>any one time?  It's a CrystalTech dedicated server, a 1.8 GHz single Intel 
>CPU machine running Windows 2003 Server and CF 5.0 with about half a gig of 
>RAM, and it can be devoted to this task if need be, so interference with 
>other applications isn't a factor.
>
>3) Finally, CFHTTP if successful will return all the code from the URL 
>called, unlike Ping.exe.  I like this fact because it will give me a truer 
>response time for each URL in my database, but all I actually need is the 
>response time in milliseconds.  Is all the data returned going to fill up 
>RAM on the server or worse go to disk cache, or can I somehow tell CF to 
>discard it immediately?
>
>Regards,
>
>Karl Simanonok
>
>
>
>  
>

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214380
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Measuring URL response times

2005-08-10 Thread Dave Watts
> I'd like to be able to measure the response times of 
> thousands of various URLs I have in a database. This 
> is one way:
> 
> 
> 
>   
> 
>  METHOD="GET"
>   resolveURL="1"
>   throwOnError="YES">
>   
> 
>   
> 
>   
> 
>   Ping time: #TimeDiff# Milliseconds!
> 
> 
> 
> The PROBLEM with this method is that the ColdFusion time 
> functions only allow resolution to the nearest second, so 
> I get results like 0, 1000, 2000, 3000 etc., a very crude 
> measurement when what I really want is response time in 
> milliseconds.

As JediHomer mentioned, you can use GetTickCount for this. You would need to
run it immediately before and after the CFHTTP:





However, I wouldn't recommend that you use CFHTTP - or CF at all - for this.
Instead, you'd be better off using some asynchronous process outside of CF
for this.

> Here is another way to to potentially solve the problem ...
> ...
> The PROBLEM with this second method is that it's got to be 
> horribly inefficient to repeatedly call Ping.exe with CFEXECUTE 
> (and wait for four replies), write a file, then read the file.

There's a bigger problem in my opinion - it doesn't tell you anything about
HTTP response times, or even whether a web server is running. ICMP isn't
HTTP. You may ping the IP address of a web server, and that web server may
not accept ICMP requests, so the ping would fail. Alternatively, you could
ping a machine that isn't even running a web server.

But again, if you were going to take this approach, I'd recommend that you
do most if not all the work somewhere other than CF. You could write a
program that takes a list of IP addresses or DNS names, pings each, parses
the results, and writes them to a file. From CF, all you'd have to do is
launch that program and provide it with the address list. This kind of thing
is pretty simple using a shell script or batch file, I think.

> 2) Secondly, because CF is limited in the number of 
> simultaneous threads it can handle (I'm using CF 5 although 
> I could use MX 6 if I really had to), what happens if 
> thousands of CFHTTP requests are made this way very quickly?  
> Does CF just stop and wait until there are threads available 
> or could so many CFHTTP requests lock up the server this app 
> would be running on? I suppose I could throttle down the 
> request rate if I had to, there isn't any reason why thousands 
> of CFHTTP requests have to be made all in one batch. So I guess 
> this question boils down to: what would be the maximum number 
> of CFHTTP requests that I should burden the server with at 
> any one time?

I'm not sure, but I believe that all the CFHTTP requests will be processed
synchronously, one after the other, by the same thread that's processing the
page. So you wouldn't use additional threads, but it would take a long time
for that request to complete.

> 3) Finally, CFHTTP if successful will return all the code 
> from the URL called, unlike Ping.exe. I like this fact 
> because it will give me a truer response time for each URL 
> in my database, but all I actually need is the response time 
> in milliseconds. Is all the data returned going to fill up 
> RAM on the server or worse go to disk cache, or can I somehow 
> tell CF to discard it immediately?

Each CFHTTP tag you run will overwrite the results of the previous CFHTTP
within that page. I don't know if the underlying memory management uses the
same memory for each one, but I would assume so. You could easily test this,
however, by looping over a set on an unused server, and seeing if memory
continues to increase while the request is running.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized 
instruction at our training centers in Washington DC, Atlanta, 
Chicago, Baltimore, Northern Virginia, or on-site at your location. 
Visit http://training.figleaf.com/ for more information!


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214322
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Measuring URL response times

2005-08-10 Thread JediHomer
getTickCount() should give you a timestamp in milliseconds


HTH


On 10/08/05, Karl Simanonok <[EMAIL PROTECTED]> wrote:
> I'd like to be able to measure the response times of thousands of various
> URLs I have in a database.  This is one way:
> 
> 
> 
> 
> 
>  METHOD="GET"
> resolveURL="1"
> throwOnError="YES">
> 
> 
> 
> 
> 
> 
> Ping time: #TimeDiff# Milliseconds!
> 
> 
> 
> The PROBLEM with this method is that the ColdFusion time functions only
> allow resolution to the nearest second, so I get results like 0, 1000,
> 2000, 3000 etc., a very crude measurement when what I really want is
> response time in milliseconds.
> 
> 
> Here is another way to to potentially solve the problem, from
> http://www.tek-tips.com/viewthread.cfm?qid=1090810&page=3:
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  timeout="5" outputfile="#dir##filename#">
> 
> 
> 
> #ip#
> 
> 
>  SUCCESS
> 
>  -failed-
> 
>  unknown
> 
> 
> 
> The PROBLEM with this second method is that it's got to be horribly
> inefficient to repeatedly call Ping.exe with CFEXECUTE (and wait for four
> replies), write a file, then read the file.  On top of it the output has to
> be parsed up to get the final number of milliseconds that I really
> want.  While this method could probably be made considerably more efficient
> by skipping the file-writing and file-reading steps and just parsing the
> output from CFEXECUTE, it's still ugly and kludgy to repeatedly call
> Ping.exe this way, I'd sooner just get my results to the nearest second
> with the first method.
> 
> 1) I'd very much like to be able to use CF by itself if possible; is there
> any known way to use CF to get the time difference between two time hacks
> in milliseconds?
> 
> 2) Secondly, because CF is limited in the number of simultaneous threads it
> can handle (I'm using CF 5 although I could use MX 6 if I really had to),
> what happens if thousands of CFHTTP requests are made this way very
> quickly?  Does CF just stop and wait until there are threads available or
> could so many CFHTTP requests lock up the server this app would be running
> on?  I suppose I could throttle down the request rate if I had to, there
> isn't any reason why thousands of CFHTTP requests have to be made all in
> one batch.  So I guess this question boils down to: what would be the
> maximum number of CFHTTP requests that I should burden the server with at
> any one time?  It's a CrystalTech dedicated server, a 1.8 GHz single Intel
> CPU machine running Windows 2003 Server and CF 5.0 with about half a gig of
> RAM, and it can be devoted to this task if need be, so interference with
> other applications isn't a factor.
> 
> 3) Finally, CFHTTP if successful will return all the code from the URL
> called, unlike Ping.exe.  I like this fact because it will give me a truer
> response time for each URL in my database, but all I actually need is the
> response time in milliseconds.  Is all the data returned going to fill up
> RAM on the server or worse go to disk cache, or can I somehow tell CF to
> discard it immediately?
> 
> Regards,
> 
> Karl Simanonok
> 
> 
> 
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.338 / Virus Database: 267.10.5/67 - Release Date: 8/9/05
> 
> 
> 
> 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214315
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Measuring URL response times

2005-08-10 Thread Dave.Phillips
Can you use the datepart function?  I haven't thought of it much, but wasn't 
sure if you are aware of it.  You can use 'l' (lower case L) as the datepart to 
get milliseconds.  Maybe that will help.

Dave

-Original Message-
From: Karl Simanonok [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 10, 2005 8:16 AM
To: CF-Talk
Subject: Measuring URL response times


I'd like to be able to measure the response times of thousands of various 
URLs I have in a database.  This is one way:












Ping time: #TimeDiff# Milliseconds!



The PROBLEM with this method is that the ColdFusion time functions only 
allow resolution to the nearest second, so I get results like 0, 1000, 
2000, 3000 etc., a very crude measurement when what I really want is 
response time in milliseconds.


Here is another way to to potentially solve the problem, from 
http://www.tek-tips.com/viewthread.cfm?qid=1090810&page=3:













#ip#


 SUCCESS

 -failed-

 unknown



The PROBLEM with this second method is that it's got to be horribly 
inefficient to repeatedly call Ping.exe with CFEXECUTE (and wait for four 
replies), write a file, then read the file.  On top of it the output has to 
be parsed up to get the final number of milliseconds that I really 
want.  While this method could probably be made considerably more efficient 
by skipping the file-writing and file-reading steps and just parsing the 
output from CFEXECUTE, it's still ugly and kludgy to repeatedly call 
Ping.exe this way, I'd sooner just get my results to the nearest second 
with the first method.

1) I'd very much like to be able to use CF by itself if possible; is there 
any known way to use CF to get the time difference between two time hacks 
in milliseconds?

2) Secondly, because CF is limited in the number of simultaneous threads it 
can handle (I'm using CF 5 although I could use MX 6 if I really had to), 
what happens if thousands of CFHTTP requests are made this way very 
quickly?  Does CF just stop and wait until there are threads available or 
could so many CFHTTP requests lock up the server this app would be running 
on?  I suppose I could throttle down the request rate if I had to, there 
isn't any reason why thousands of CFHTTP requests have to be made all in 
one batch.  So I guess this question boils down to: what would be the 
maximum number of CFHTTP requests that I should burden the server with at 
any one time?  It's a CrystalTech dedicated server, a 1.8 GHz single Intel 
CPU machine running Windows 2003 Server and CF 5.0 with about half a gig of 
RAM, and it can be devoted to this task if need be, so interference with 
other applications isn't a factor.

3) Finally, CFHTTP if successful will return all the code from the URL 
called, unlike Ping.exe.  I like this fact because it will give me a truer 
response time for each URL in my database, but all I actually need is the 
response time in milliseconds.  Is all the data returned going to fill up 
RAM on the server or worse go to disk cache, or can I somehow tell CF to 
discard it immediately?

Regards,

Karl Simanonok



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.5/67 - Release Date: 8/9/05





~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214312
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54