On Fri, Mar 08, 2002 at 02:41:08PM +0900, Leif Mortenson wrote: > Marcus Crafter wrote: > > > With a listener based approach you'd need to write a listener > > class that is updated with profile point data, but accessed by the > > reporting class when on-demand data is required. This incurs an extra > > step as the listener implementation is essentially acting as a > > pullable source for the data (or have I misunderstood something ?) > > > Actually in your case, you do not need to implement any listeners. > Simply obtain > references to the ProfileSampleDescriptors you are interrested in and > call getValue() or getSnapshot() each time you need a value.
Ah. ok, thanks for the pointer. > The problem is that it is not really possible to build a truely pull > based system which > would be efficient. Especially across the network. <snip> > When a client does request data, it does not matter if they missed a few > sample > intervals because of some latency, the data, correctly intervalled, will > all still be there. Ok, thanks again for the pointer, I'll take a closer look at ProfileSample and have a play around with it. > > The other thing is I would like to be able to change the sample > > rates dynamically on particular profilables. With the reporting > > tool pulling the data down (basically acting as the driver), this is > > easy and can be made a part of the gui tool. I'm not sure how it > > could > > be easily done with the listener approach ? > > > I agree, this is one area which is more difficult. But what are some > scenarios of > what you would like to do? Our application sees quite heavy usage during 9-10am for example, and our production folk would like to watch how aggressive memory growth is during that time on a fine level basis, say samples every 10 seconds. After 10am though, the information isn't as critical and samples could be taken every hour. Other times of the day though, they might like to temporarily change that rate of sampling on the fly. Ideally, everyone could run their own version of the gui tool and set their own rate of information gathering on the profilables they wish to watch, dynamically, and independant of others. Cheers, Marcus -- ..... ,,$$$$$$$$$, Marcus Crafter ;$' '$$$$: Computer Systems Engineer $: $$$$: ManageSoft GmbH $ o_)$$$: 82-84 Mainzer Landstrasse ;$, _/\ &&:' 60327 Frankfurt Germany ' /( &&& \_&&&&' &&&&. &&&&&&&: -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>