admin@glassfish.java.net

Re: initial value of lastsampletime

From: Lloyd Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Fri, 16 Oct 2009 13:55:36 -0700

If the attribute is advertised as being there, it has to return
something, though I suppose that it could return null.


On Oct 16, 2009, at 1:44 PM, Bill Shannon wrote:

> What would you recommend that we return from the "asadmin get"
> command,
> which is currently returning the time in milliseconds. "0"? "-1"?
> Not return the attribute at all?
>
>
> Hans Hrasna wrote on 10/16/09 13:40:
>> If no sample was ever taken the value should be null, since any
>> numerical value would represent an actual time and falsely
>> insinuate that a measurement was taken at that time.
>> Bill Shannon wrote:
>>> And what should its value be if no sample was ever taken?
>>>
>>>
>>> Hans Hrasna wrote on 10/16/09 12:48:
>>>> Hi,
>>>>
>>>> lastSampleTime is the time that the measurement was taken. For
>>>> example, if measurements are being taken every hour and being
>>>> stored in a variable or table, then the lastSampleTime should
>>>> reflect the time the data was sampled and stored. Or for example
>>>> if measurements are being taken every time an event occurs, like
>>>> a connection, then the lastSampleTime is the time of the last
>>>> event.
>>>>
>>>> -Hans
>>>>
>>>>
>>>> Sankar Neelakandan wrote:
>>>>> May be Hans can tell us what he meant by this in JSR 77 spec.
>>>>>
>>>>> JSR77.6.4.1.5
>>>>> getLastSampleTime long getLastSampleTime()
>>>>> Returns the time the most recent measurment was taken
>>>>> represented as a long,whose value is the number of milliseconds
>>>>> since January 1, 1970, 00:00:00.
>>>>>
>>>>>
>>>>>> 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?
>>>>> > hmm..actually I just tried this and the lastSampleTime gets
>>>>> updated every time you do "get" with the current time. That
>>>>> doesn't seem right to me.
>>>>>
>>>>> What you are seeing is correct because stats is a continuously
>>>>> changing entity and something else (being get command/GUI etc.,)
>>>>> who is interested in the entity can take a measurement at a
>>>>> desired time specified by lastSampleTime.
>>>>>
>>>>>>>
>>>>>>> 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
>>>>> The example with processingtime shows the process of "how it is
>>>>> calculated rather than how it is sampled."
>>>>>
>>>>>>
>>>>
>>>
>
>
> ---------------------------------------------------------------------
> 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