Page 1 of 1
Calculating Network Latency
Posted: Tue Dec 30, 2003 2:23 pm
by mjacobson
Is there a way with vortex to calculate the network latency while fetching Urls?
I have tried:
<sysinfo proctime><$startTime = $ret>
<fetch $Url>
<sysinfo proctime $startTime><$totalTime = $ret>
<loop SKIP=2 $totalTime><$Latency = $totalTime></loop>
<$Latency=($Latency/2)>
While this seems to work, at times, it gives me really high values, "15.003459" for $Latency.
Calculating Network Latency
Posted: Tue Dec 30, 2003 4:58 pm
by John
You can use <urlinfo totaltime> <urlinfo dnstime> and <urlinfo transfertime> to get times. Sometimes if a nameserver is down it may take 15 seconds before trying DNS again.
Calculating Network Latency
Posted: Wed Dec 31, 2003 8:37 am
by mjacobson
Thanks. I don't know how I missed reading about these urlinfo flags. Transfertime seems to be what I need.
I do have another question concerning redirects and <urlinfo header "Date">. When I fetch a page that is on one server (
www.somesite.com) and get redirected to a different server (
www.newserver.com), which header am I getting the Date value from?
Also, is there a way with vortex to get just the server's header without making a http request with fetch for a document on that server? I need to write a script that retrives the servers date so we can see if it is in sync with a time server. I want to keep bandwidth and network load down as much as possible.
Calculating Network Latency
Posted: Wed Dec 31, 2003 9:45 am
by John
You should be getting the date from the last URL fetched, which has the actual content.
You can use <SUBMIT METHOD=HEAD URL=
http://SOMESITE/> which should just fetch the headers, and not the content, assuming that the webserver supports HEAD (most do).