<div><br></div>   That works. Just FYI, the same data is available through the Drools MBeans... you can use jconsole to monitor it or any other JMX console.<div><br></div><div>   Edson<br><br><div class="gmail_quote">2011/10/12 Dean Whisnant <span dir="ltr">&lt;<a href="mailto:dean@basys.com">dean@basys.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">You could create a listener and combine it with a log.  There is org.drools.event.rule.DefaultAgendaEventListener that has two methods I use to log which rule started firing and when the rule completes firing with:<br>

<br>
        @Override<br>
        public void beforeActivationFired(BeforeActivationFiredEvent event)<br>
        {<br>
                try<br>
                {<br>
                        logFile.write(&quot;Package(&quot; + event.getActivation().getRule().getPackageName() + &quot;).Rule(&quot; + event.getActivation().getRule().getName() + &quot;) firing ... &quot;);<br>
                }<br>
                catch (Exception e) { }<br>
        }<br>
<br>
        @Override<br>
        public void afterActivationFired(AfterActivationFiredEvent event)<br>
        {<br>
                try<br>
                {<br>
                        logFile.write(&quot;done!\n&quot;);<br>
                }<br>
                catch (Exception e) { }<br>
        }<br>
<br>
You could obviously do other logging with time and date stamps, or send it to a database rather than a .log file like I&#39;m doing here.  In my case I get a list of all rules that fire in a fireallrules session.  I can see if a rule fires multiple times, or ends up in an endless loop.<br>

<br>
Peace!<br>
<font color="#888888"><br>
Dean<br>
</font><div><div></div><div class="h5"><br>
-----Original Message-----<br>
From: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>] On Behalf Of arrehman<br>

Sent: Wednesday, October 12, 2011 1:21 PM<br>
To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
Subject: [rules-users] How to improve drools performance?<br>
<br>
Is there a way to log / monitor the time taken for rule in a Drools rule set?<br>
<br>
Is there a way to make sure that one rule is not executed more than once(It seems to be happening in my case)<br>
<br>
What are the general guidelines on improving Drools performance?<br>
<br>
Currently I am using a one single DRL file with 100 odd rules.<br>
<br>
Any additiional information you need will be provided.<br>
<br>
Thanks,<br>
<br>
Abdul<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/How-to-improve-drools-performance-tp3416326p3416326.html" target="_blank">http://drools.46999.n3.nabble.com/How-to-improve-drools-performance-tp3416326p3416326.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>