On 05/11/2010 20:52, H.C. wrote:
I am trying to implement a performance monitor to find the most
problematic
rules in order to optimize performance. The main performance metrics I want
to gather are:
1. How any times a rule's conditions have been evaluated
2. How long each rule's condition evaluation took
1 and 2 are hard because
it's not that straight forward, it's not a
single block. And the tree traversal approach to our current Rete impl
means it interates from root to tip repeatedly, so you can't easily
determine how long it spends in each node, you could probably add a
counter but this would be custom code. We ar working on an new algorithm
that is single pass, more like a pipeline, which will make ti easier to
get statistics and timings.
3. How many times a rule's then clause actually executed
4. How long execution of a rule's then clause took
That you can do with the
agenda listener. Also try looking at the audit
log impl.
Are there any existing or recommended approaches to do this? I have
looked
some at the AgendaEventListener methods but can't clearly map events to the
above. Is there some other logging interface with more events?
Thanks in advance.