admin@glassfish.java.net

Re: initial value of lastsampletime

From: Lloyd Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Thu, 15 Oct 2009 12:11:13 -0700

Jennifer,

Does the client ever see the "-1"? I can see it being used as a
trigger, but it must never be returned as a value.

Lloyd

On Oct 15, 2009, at 10:53 AM, Jennifer Chou wrote:

> Hi Bill,
>
> For the lastsampletime in the monitoring stats, we wanted to change
> what it is initialized to.
>
> In v3 lastsampletime is currently initialized to -1 when nothing has
> triggered a statistic measurement to be taken (ie ping a url for a
> web app).
> In v2 lastsampletime used to display the current time as the get
> command was run.
>
> We changed this in v3 because it seemed a more accurate reflection
> of the definition...
>
> lastsampletime - The time of the last measurement represented as a
> long, whose value is the number of milliseconds since January 1,
> 1970, 00:00:00.
> starttime - The time of the first measurement represented as a long,
> whose value is the number of milliseconds since January 1, 1970,
> 00:00:00.
>
> Do you think this will be ok?
>
> Examples....
>
> v2:
>
> server.applications.hello.server.activesessionscurrent-count = 0
> server.applications.hello.server.activesessionscurrent-description =
> Number of currently active sessions
> server.applications.hello.server.activesessionscurrent-
> lastsampletime = 1255626451250
> server.applications.hello.server.activesessionscurrent-name =
> ActiveSessionsCurrent
> server.applications.hello.server.activesessionscurrent-starttime =
> 1255626253015
> server.applications.hello.server.activesessionscurrent-unit = count
>
> server.applications.hello.server.sessionstotal-count = 0
> server.applications.hello.server.sessionstotal-description = Total
> number of sessions created
> server.applications.hello.server.sessionstotal-lastsampletime =
> 1255626451234
> server.applications.hello.server.sessionstotal-name = SessionsTotal
> server.applications.hello.server.sessionstotal-starttime =
> 1255626253015
> server.applications.hello.server.sessionstotal-unit = count
>
> v3:
>
> server.applications.hello.server.activesessionscount-current = 0
> server.applications.hello.server.activesessionscount-description =
> Number of active sessions
> server.applications.hello.server.activesessionscount-highwatermark = 0
> server.applications.hello.server.activesessionscount-lastsampletime
> = -1
> server.applications.hello.server.activesessionscount-lowwatermark = 0
> server.applications.hello.server.activesessionscount-name =
> ActiveSessions
> server.applications.hello.server.activesessionscount-starttime =
> 1255626696046
> server.applications.hello.server.activesessionscount-unit = count
>
> server.applications.hello.server.sessionstotal-count = 0
> server.applications.hello.server.sessionstotal-description = Total
> number of sessions ever created
> server.applications.hello.server.sessionstotal-lastsampletime = -1
> server.applications.hello.server.sessionstotal-name = SessionsTotal
> server.applications.hello.server.sessionstotal-starttime =
> 1255626696046
> server.applications.hello.server.sessionstotal-unit = count
>
> Thanks,
> Jennifer

Lloyd Chambers
lloyd.chambers_at_sun.com
GlassFish Team