The Sampler
is responsible for generating SampleEvents
, but does not actually do anything with those Samples
. Functions such as logging, graphing, and watchdog notifications should be performed by SampleListeners
.
Dynamo includes an example SampleListener
called MemorySampler
. This listener does nothing more than save a small history of the SampleEvents
sent to it. You can view that history by viewing the MemorySampler
component in the Component Browser.
The MemorySampler
component that comes with Dynamo has a service name of /atg/dynamo/service/MemorySampler
. Its configuration file, MemorySampler.properties
, looks like this:
$class=atg.service.statistics.MemorySampler
sampleListSize=40
The sampleListSize
property determines how many SampleEvents
will be stored before the MemorySampler
starts discarding the oldest events.