admin@glassfish.java.net

Re: initial value of lastsampletime

From: Jennifer Chou <Jennifer.Chou_at_Sun.COM>
Date: Fri, 16 Oct 2009 00:22:25 +0100

Bill Shannon wrote:
> Jennifer Chou wrote:
>> Let's say the statistic is processingtime (average request processing
>> time = total time/count) for a web app. Before we hit the web page
>> for a request, there are no measurements/samples taken. (no probes
>> fired)
>> If we do a asadmin get to retrieve the stats at this point, it will
>> return the stats at some initial value. In v2 this initial value for
>> lastsampletime = current time. In v3 we were thinking -1. This way
>> there is no doubt that nothing has been collected yet for this stat.
>>
>> Every time we hit the web page, a measurement is taken for that
>> processingtime statistic. The count gets incremented, totaltime is
>> accumulated, and the lastsampletime is set to current time.
>> After 10 hits, the lastsampletime is the time of the 10th hit (time
>> of last measurment), and starttime is the time of the 1st hit (time
>> of first measurement).
>
> And if, after that 10th hit, I do "get" 10 times, every one of them will
> return exactly the same data, until the next hit of the web page?
correct.
>
> The confusion is over whether "get" is *causing* the sampling, or is
> just returning the sampled data that was caused by something else.
the latter - returns the sampled data that was caused by something else