WAImageStatus uptime tracking

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

WAImageStatus uptime tracking

Sven Van Caekenberghe
Hi,

I am using WAImageStatus and friends to check the health of my deployed images.

The uptime reported by WAImageStatus (a WAPharoStatusItem subclass) has been annoying me for some time: the value wraps around much too quickly, in the order of days it seems (and we all know Seaside/Smalltalk images keep running for much longer) (based on Time>>#millisecondClockValue, a primitive):

        upTime := Duration milliseconds: Time millisecondClockValue.

I made a simple helper class, WAUpTimeTracker, fileout attached, that I think would do a better job:

        upTime := WAUpTimeTracker imageUpTime.

The value is being set automatically at system startup.

Is this something worth including ?

Sven





_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

WAUpTimeTracker.st (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: WAImageStatus uptime tracking

Philippe Marschall
2011/3/12 Sven Van Caekenberghe <[hidden email]>:

> Hi,
>
> I am using WAImageStatus and friends to check the health of my deployed images.
>
> The uptime reported by WAImageStatus (a WAPharoStatusItem subclass) has been annoying me for some time: the value wraps around much too quickly, in the order of days it seems (and we all know Seaside/Smalltalk images keep running for much longer) (based on Time>>#millisecondClockValue, a primitive):
>
>        upTime := Duration milliseconds: Time millisecondClockValue.
>
> I made a simple helper class, WAUpTimeTracker, fileout attached, that I think would do a better job:
>
>        upTime := WAUpTimeTracker imageUpTime.
>
> The value is being set automatically at system startup.
>
> Is this something worth including ?

Well personally I think this should be fixed in Pharo. In addition my
impression is that start up classes introduce more problems than they
solve. However since you already attached a patch it would be rude to
turn it down. The code had two issues, it would not unload properly
and would also reset the uptime if you just saved the image. I fixed
those.

 [1] http://code.google.com/p/seaside/issues/detail?id=596

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: WAImageStatus uptime tracking

Sven Van Caekenberghe
Hi Philippe,

On 14 Mar 2011, at 08:14, Philippe Marschall wrote:

> Well personally I think this should be fixed in Pharo.

I submitted it as an issue, http://code.google.com/p/pharo/issues/detail?id=3816
but it might be more VM related (primitive 135).

> In addition my impression is that start up classes introduce more problems than they solve.

OK. I just thought that since GRPlatform had support for it, it was OK to use it.

> However since you already attached a patch it would be rude to turn it down.

Great.

> The code had two issues, it would not unload properly
> and would also reset the uptime if you just saved the image. I fixed those.

OK, thanks for the corrections, I never heard of or used #unload or #startuUp: so I learned something new !

Regards,

Sven_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside