admin@glassfish.java.net

Re: initial value of lastsampletime

From: Lloyd Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Thu, 15 Oct 2009 16:27:14 -0700

If the statistic is processingtime, then would it just have an initial
sample when created, with processingtime of 0?

Lloyd

On Oct 15, 2009, at 4:22 PM, Jennifer Chou wrote:

> 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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>

Lloyd Chambers
lloyd.chambers_at_sun.com
GlassFish Team