Re: [squid-users] Elapsed Time

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 23 Jun 2009 12:03:02 +1200

On Mon, 22 Jun 2009 15:50:51 -0300, Alejandro Martinez
<amartinez_at_equital.com.uy> wrote:
> Amos, thanks for your reply.
>
> The last question, how do youy estimate that time ??

Now there is a deep philosophical question. You would probably best look up
research info to get an accurate answer.

Basically: requests are broken into 3 sets: unprocessed, selected, and
finished.

 1) take request X as a starting point.
 2) Then select all requests that have X as a referrer made within 30
seconds (user max attention span for page load time).
 3) Repeat (2) until no more requests are added using referer info.
 4) Then pick a timespan T and select all requests made from same IP as X
within time T of the existing range.
 5) shuffle the first request we started with in (1) into the finished
pile.
 5) for each request now selected (4) go back and repeat (1)->(4) for X
being that selected request.
 6) repeat steps (2)->(5) until there are no new requests to handle.
 7) track the earliest and latest timestamp from all requests processed in
the above. Your 'visitor time' for _one_ session is the difference between
those two.

This is just me, but a measure for T of 5 minutes seems about right to
catch my clients usage patterns. Accurate values requires research.

I highly recommend finding an existing tool that does all this for you.
Writing it from scratch is complicated at best and I'm sure I missed some
complex issue out of my quick description above.

Amos

>
> Thanks,
> Alejandro
>
> Amos Jeffries escribió:
>> Alejandro Martinez wrote:
>>> Is there any chance to get the elapsed time a user has spent on a site
?
>>>
>>> If a user acces a site (ex: www.site.com) at 9:00 am for about 15
>>> minutes, and then He access again at 12:00 for about another 15
>>> minutes, how do I know the total timeelapsed on that site ?
>>>
>>> This question is because I've read that if you take the last log
>>> access - the first log access for that site you can estimate it, but
>>> if I do that, I have 3 hours and not 30 minutes.
>>>
>>>
>>> I've seen that SARG show a total time on a site, but is that time true?
>>
>> No its an estimate based on first and last page visits.
>>
>>
>> Download time and duration for requests can be found in the log. That
>> will be what SARG is basing its calculations on.
>>
>> Most users 'access' a site in the order of a few seconds at a time.
>> The rest of the time is spent looking at a web browser display
>> completely offline.
>>
>> Amos
Received on Tue Jun 23 2009 - 00:03:06 MDT

This archive was generated by hypermail 2.2.0 : Tue Jun 23 2009 - 12:00:03 MDT