[jboss-svn-commits] JBL Code SVN: r24267 - labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/manners.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sat Dec 6 00:57:03 EST 2008
Author: mark.proctor at jboss.com
Date: 2008-12-06 00:57:03 -0500 (Sat, 06 Dec 2008)
New Revision: 24267
Modified:
labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/manners/MannersBenchmark.java
Log:
-resolved conflicts
Modified: labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/manners/MannersBenchmark.java
===================================================================
--- labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/manners/MannersBenchmark.java 2008-12-06 05:52:30 UTC (rev 24266)
+++ labs/jbossrules/trunk/drools-examples/drools-examples-drl/src/main/java/org/drools/benchmark/manners/MannersBenchmark.java 2008-12-06 05:57:03 UTC (rev 24267)
@@ -50,29 +50,31 @@
final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( pkgs );
- StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
-
- String filename;
- if ( args.length != 0 ) {
- String arg = args[0];
- filename = arg;
- } else {
- filename = "manners128.dat";
+ for ( int i = 0; i < 10; i++ ) {
+ StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
+
+ String filename;
+ if ( args.length != 0 ) {
+ String arg = args[0];
+ filename = arg;
+ } else {
+ filename = "manners128.dat";
+ }
+
+ InputStream is = MannersBenchmark.class.getResourceAsStream( filename );
+ List list = getInputObjects( is );
+ for ( Iterator it = list.iterator(); it.hasNext(); ) {
+ Object object = it.next();
+ ksession.insert( object );
+ }
+
+ ksession.insert( new Count( 1 ) );
+
+ long start = System.currentTimeMillis();
+ ksession.fireAllRules();
+ System.err.println( System.currentTimeMillis() - start );
+ ksession.dispose();
}
-
- InputStream is = MannersBenchmark.class.getResourceAsStream( filename );
- List<Object> list = getInputObjects( is );
- for ( Iterator<Object> it = list.iterator(); it.hasNext(); ) {
- Object object = it.next();
- ksession.insert( object );
- }
-
- ksession.insert( new Count( 1 ) );
-
- long start = System.currentTimeMillis();
- ksession.fireAllRules();
- System.err.println( System.currentTimeMillis() - start );
- ksession.dispose();
}
/**
More information about the jboss-svn-commits
mailing list