I've thought about some callback mechanism that is executed when a rule
is no longer true, the problem I have is which variable changed to make
the rule no longer true and how do I expose the bound variables to the
user, especially if the rule is no longer true due to a retraction, and
ofcourse I need to figure our the DRL syntax that makes sense.
I've thought about doing it as a sort of logical closure, so you have to
declare the data:
insertLogicalClosure( new LogicalClosure() {
execute() {.......}
} )
Not sure how to make the data accessible, maybe the user should have to
populate the map. Anyway idea is in the same way that a logical insert
is executed when the rule is true, the logical closure/method is executed.
So if someone has some time and fun, maybe they would work on this and
submit a patch :)
Mark
Anstis, Michael (M.) wrote:
Do you use a stateful session?
Are your measurements before and after you've inserted facts into
working memory?
Would be helpful to the group to post your use-case source?
Thanks,
Mike
------------------------------------------------------------------------
*From:* rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] *On Behalf Of *Roger
Tanuatmadja
*Sent:* 29 July 2008 02:12
*To:* Rules Users List
*Subject:* [rules-users] Measuring Drools Memory Usage
Hi,
Has anyone attempted to measure the incremental memory usage of
using Drools? Anyone cares to share their methodology?
I am currently following the following methodology:
1. Prevent garbage collection from happening by using large Xms
Xmx (1024m in my case), a NewRatio of 2 (I am sure other sizes
will work as well) and verbogegc enabled to confirm that no
garbage collection is happening.
2. Use Runtime.freeMemory before and after fireAllRules and
measuring the difference.
The problem with my methods so far has been that after a positive
memory usage (indicating you are using memory), subsequent use
case (the same one) incurs zero memory usage which is very strange.
So I guess my question is 2 fold: anyone care to share their
methodology, and can anyone see what's wrong with mine?
Thanks,
Roger
------------------------------------------------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users