JBoss JBPM SVN: r4098 - jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf.
by do-not-reply@jboss.org
Author: mvecera(a)redhat.com
Date: 2009-03-02 09:03:48 -0500 (Mon, 02 Mar 2009)
New Revision: 4098
Modified:
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java
Log:
SimplePerformanceTest update
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java 2009-03-02 13:57:39 UTC (rev 4097)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java 2009-03-02 14:03:48 UTC (rev 4098)
@@ -22,7 +22,6 @@
package org.jbpm.perf;
// $Id$
-import java.io.File;
import java.util.Date;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.commons.logging.Log;
@@ -111,7 +110,6 @@
ProcessInstance pi = (ProcessInstance) commandService.execute(startCommand);
Token token = pi.getRootToken();
- token.lock(ESB_ASYNC_SIGNAL_ACTION_NAME);
final ExecuteActionJob signalJob = new ExecuteActionJob(token);
signalJob.setAction(signalAction);
@@ -157,7 +155,6 @@
throws Exception {
final Token token = executionContext.getToken();
final long tokenId = token.getId();
- token.unlock(ESB_ASYNC_SIGNAL_ACTION_NAME);
final JbpmContext jbpmContext = executionContext.getJbpmContext();
final SignalCommand signalCommand = new SignalCommand(tokenId, null);
15 years, 2 months
JBoss JBPM SVN: r4097 - jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf.
by do-not-reply@jboss.org
Author: mvecera(a)redhat.com
Date: 2009-03-02 08:57:39 -0500 (Mon, 02 Mar 2009)
New Revision: 4097
Modified:
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java
Log:
SimplePerformanceTest update
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java 2009-03-02 13:56:34 UTC (rev 4096)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java 2009-03-02 13:57:39 UTC (rev 4097)
@@ -60,7 +60,7 @@
private static final Log log = LogFactory.getLog(SimplePerformanceTest.class);
private static final String ESB_ASYNC_SIGNAL_ACTION_NAME = "ESB_ASYNC_SIGNAL_ACTION";
private CommandService commandService = new CommandServiceImpl(getJbpmConfiguration());
- private static final int INSTANCES = 10;
+ private static final int INSTANCES = 10000;
private static int count = 1;
private static AtomicInteger signaled = new AtomicInteger(0);
private Action signalAction;
15 years, 2 months
JBoss JBPM SVN: r4096 - jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/java/org/jbpm/perf.
by do-not-reply@jboss.org
Author: mvecera(a)redhat.com
Date: 2009-03-02 08:56:34 -0500 (Mon, 02 Mar 2009)
New Revision: 4096
Modified:
jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/java/org/jbpm/perf/SimplePerformanceTest.java
Log:
SimplePerformanceTest updated
Modified: jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/java/org/jbpm/perf/SimplePerformanceTest.java
===================================================================
--- jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/java/org/jbpm/perf/SimplePerformanceTest.java 2009-03-02 12:52:00 UTC (rev 4095)
+++ jbpm3/branches/jpdl-3.2.2-SOA-4.2/jpdl/jar/src/test/java/org/jbpm/perf/SimplePerformanceTest.java 2009-03-02 13:56:34 UTC (rev 4096)
@@ -22,17 +22,28 @@
package org.jbpm.perf;
// $Id$
-
+import java.io.File;
+import java.util.Date;
+import java.util.concurrent.atomic.AtomicInteger;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jbpm.JbpmContext;
+import org.jbpm.JbpmException;
import org.jbpm.command.CommandService;
-import org.jbpm.command.StartProcessInstanceCommand;
+import org.jbpm.command.NewProcessInstanceCommand;
+import org.jbpm.command.SignalCommand;
import org.jbpm.command.impl.CommandServiceImpl;
import org.jbpm.db.AbstractDbTestCase;
+import org.jbpm.graph.def.Action;
import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.instantiation.Delegation;
+import org.jbpm.job.ExecuteActionJob;
+import org.jbpm.msg.MessageService;
+import org.jbpm.svc.Services;
/**
* This tests creates a number of process instances.
@@ -45,66 +56,110 @@
* @author thomas.diesler(a)jboss.com
* @since 18-Feb-2009
*/
-public class SimplePerformanceTest extends AbstractDbTestCase
-{
- private static final Log log = LogFactory.getLog(SimplePerformanceTest.class);
-
- private CommandService commandService = new CommandServiceImpl(getJbpmConfiguration());
- private static final int INSTANCES = 1000;
- private static int count;
-
- ProcessDefinition processDefinition;
+public class SimplePerformanceTest extends AbstractDbTestCase {
+ private static final Log log = LogFactory.getLog(SimplePerformanceTest.class);
+ private static final String ESB_ASYNC_SIGNAL_ACTION_NAME = "ESB_ASYNC_SIGNAL_ACTION";
+ private CommandService commandService = new CommandServiceImpl(getJbpmConfiguration());
+ private static final int INSTANCES = 10000;
+ private static int count = 1;
+ private static AtomicInteger signaled = new AtomicInteger(0);
+ private Action signalAction;
+ ProcessDefinition processDefinition;
- public void setUp() throws Exception
- {
- super.setUp();
-
- processDefinition = ProcessDefinition.parseXmlString(
- "<process-definition xmlns='urn:jbpm.org:jpdl-3.1' name='processDefinition1'>" +
- " <start-state name='start'>" +
- " <transition name='to_state' to='end'>" +
- " <action class='" + PerfActionHandler.class.getName() + "'/>" +
- " </transition>" +
- " </start-state>" +
- " <end-state name='end'/>" +
- "</process-definition>");
-
- saveAndReload(processDefinition);
- }
+ public void setUp() throws Exception {
+ super.setUp();
- public void tearDown() throws Exception
- {
- beginSessionTransaction();
- jbpmContext.getGraphSession().deleteProcessDefinition(processDefinition.getId());
- super.tearDown();
- }
+ processDefinition = ProcessDefinition.parseXmlString(
+ "<process-definition xmlns='urn:jbpm.org:jpdl-3.1' name='processDefinition1'>" +
+ " <start-state name='start'>" +
+ " <transition name='to_state' to='end'>" +
+ " <action class='" + PerfActionHandler.class.getName() + "'/>" +
+ " </transition>" +
+ " </start-state>" +
+ " <end-state name='end'/>" +
+ "</process-definition>");
- public void testAsyncCall()
- {
- long start = System.currentTimeMillis();
+ final Delegation delegation = new Delegation(AsyncSignalAction.class.getName());
+ delegation.setConfigType("constructor");
+ signalAction = new Action(delegation);
+ signalAction.setName(ESB_ASYNC_SIGNAL_ACTION_NAME);
+ processDefinition.addAction(signalAction);
- commitAndCloseSession();
+ saveAndReload(processDefinition);
+ }
- for (count = 0; count < INSTANCES; count++)
- {
+ public void tearDown() throws Exception {
beginSessionTransaction();
- StartProcessInstanceCommand startCommand = new StartProcessInstanceCommand();
- startCommand.setProcessId(processDefinition.getId());
- startCommand.setProcessName("processDefinition1");
- ProcessInstance pi = (ProcessInstance)commandService.execute(startCommand);
+ jbpmContext.getGraphSession().deleteProcessDefinition(processDefinition.getId());
+ super.tearDown();
+ }
+
+ public void testAsyncCall() {
+ long start = System.currentTimeMillis();
+
+ startJobExecutor();
+
commitAndCloseSession();
- }
- long stop = System.currentTimeMillis();
- System.out.println("=== Test finished processing " + INSTANCES + " instances in " + (stop - start) + "ms ===");
- System.out.println("=== This is " + Math.round(1000 * INSTANCES / (stop - start)) + " instances per second ===");
- }
+ for (int i = 0; i < INSTANCES; i++) {
+ beginSessionTransaction();
+ NewProcessInstanceCommand startCommand = new NewProcessInstanceCommand();
+ startCommand.setProcessId(processDefinition.getId());
+ startCommand.setProcessName("processDefinition1");
+ ProcessInstance pi = (ProcessInstance) commandService.execute(startCommand);
- public static class PerfActionHandler implements ActionHandler
- {
- public void execute(ExecutionContext executionContext) throws Exception
- {
- //System.out.println(count);
- }
- }
+ Token token = pi.getRootToken();
+ final ExecuteActionJob signalJob = new ExecuteActionJob(token);
+
+ signalJob.setAction(signalAction);
+ signalJob.setDueDate(new Date());
+ signalJob.setSuspended(token.isSuspended());
+
+ final MessageService messageService = (MessageService) Services.getCurrentService(Services.SERVICENAME_MESSAGE, true);
+ messageService.send(signalJob);
+
+ commitAndCloseSession();
+ }
+
+ while (signaled.get() < INSTANCES) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ // no problem, computer's fault
+ }
+ }
+
+ stopJobExecutor();
+
+ long stop = System.currentTimeMillis();
+ System.out.println("=== Test finished processing " + INSTANCES + " instances in " + (stop - start) + "ms ===");
+ System.out.println("=== This is " + Math.round(1000 * INSTANCES / (stop - start)) + " instances per second ===");
+ }
+
+ public static class PerfActionHandler implements ActionHandler {
+ private static final long serialVersionUID = -2171981067863454024L;
+ public void execute(ExecutionContext executionContext) throws Exception {
+ //System.out.println(count);
+ count++;
+ }
+ }
+
+ private static class AsyncSignalAction implements ActionHandler {
+ private static final long serialVersionUID = -8617329370138396271L;
+
+ AsyncSignalAction(final String configuration) throws JbpmException {
+ }
+
+ public void execute(final ExecutionContext executionContext)
+ throws Exception {
+ final Token token = executionContext.getToken();
+ final long tokenId = token.getId();
+ final JbpmContext jbpmContext = executionContext.getJbpmContext();
+
+ final SignalCommand signalCommand = new SignalCommand(tokenId, null);
+ signalCommand.execute(jbpmContext);
+
+ signaled.incrementAndGet();
+ }
+ }
}
15 years, 2 months
JBoss JBPM SVN: r4095 - jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf.
by do-not-reply@jboss.org
Author: mvecera(a)redhat.com
Date: 2009-03-02 07:52:00 -0500 (Mon, 02 Mar 2009)
New Revision: 4095
Modified:
jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java
Log:
SimplePerformanceTest update
Modified: jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java 2009-03-01 03:01:13 UTC (rev 4094)
+++ jbpm3/branches/jbpm-3.2.5.SP/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java 2009-03-02 12:52:00 UTC (rev 4095)
@@ -22,17 +22,28 @@
package org.jbpm.perf;
// $Id$
-
+import java.io.File;
+import java.util.Date;
+import java.util.concurrent.atomic.AtomicInteger;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jbpm.JbpmContext;
+import org.jbpm.JbpmException;
import org.jbpm.command.CommandService;
-import org.jbpm.command.StartProcessInstanceCommand;
+import org.jbpm.command.NewProcessInstanceCommand;
+import org.jbpm.command.SignalCommand;
import org.jbpm.command.impl.CommandServiceImpl;
import org.jbpm.db.AbstractDbTestCase;
+import org.jbpm.graph.def.Action;
import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.instantiation.Delegation;
+import org.jbpm.job.ExecuteActionJob;
+import org.jbpm.msg.MessageService;
+import org.jbpm.svc.Services;
/**
* This tests creates a number of process instances.
@@ -45,66 +56,114 @@
* @author thomas.diesler(a)jboss.com
* @since 18-Feb-2009
*/
-public class SimplePerformanceTest extends AbstractDbTestCase
-{
- private static final Log log = LogFactory.getLog(SimplePerformanceTest.class);
-
- private CommandService commandService = new CommandServiceImpl(getJbpmConfiguration());
- private static final int INSTANCES = 1000;
- private static int count;
-
- ProcessDefinition processDefinition;
+public class SimplePerformanceTest extends AbstractDbTestCase {
+ private static final Log log = LogFactory.getLog(SimplePerformanceTest.class);
+ private static final String ESB_ASYNC_SIGNAL_ACTION_NAME = "ESB_ASYNC_SIGNAL_ACTION";
+ private CommandService commandService = new CommandServiceImpl(getJbpmConfiguration());
+ private static final int INSTANCES = 10;
+ private static int count = 1;
+ private static AtomicInteger signaled = new AtomicInteger(0);
+ private Action signalAction;
+ ProcessDefinition processDefinition;
- public void setUp() throws Exception
- {
- super.setUp();
-
- processDefinition = ProcessDefinition.parseXmlString(
- "<process-definition xmlns='urn:jbpm.org:jpdl-3.1' name='processDefinition1'>" +
- " <start-state name='start'>" +
- " <transition name='to_state' to='end'>" +
- " <action class='" + PerfActionHandler.class.getName() + "'/>" +
- " </transition>" +
- " </start-state>" +
- " <end-state name='end'/>" +
- "</process-definition>");
-
- saveAndReload(processDefinition);
- }
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
- public void tearDown() throws Exception
- {
- beginSessionTransaction();
- jbpmContext.getGraphSession().deleteProcessDefinition(processDefinition.getId());
- super.tearDown();
- }
+ processDefinition = ProcessDefinition.parseXmlString(
+ "<process-definition xmlns='urn:jbpm.org:jpdl-3.1' name='processDefinition1'>" +
+ " <start-state name='start'>" +
+ " <transition name='to_state' to='end'>" +
+ " <action class='" + PerfActionHandler.class.getName() + "'/>" +
+ " </transition>" +
+ " </start-state>" +
+ " <end-state name='end'/>" +
+ "</process-definition>");
- public void testAsyncCall()
- {
- long start = System.currentTimeMillis();
+ final Delegation delegation = new Delegation(AsyncSignalAction.class.getName());
+ delegation.setConfigType("constructor");
+ signalAction = new Action(delegation);
+ signalAction.setName(ESB_ASYNC_SIGNAL_ACTION_NAME);
+ processDefinition.addAction(signalAction);
- commitAndCloseSession();
+ saveAndReload(processDefinition);
+ }
- for (count = 0; count < INSTANCES; count++)
- {
+ @Override
+ public void tearDown() throws Exception {
beginSessionTransaction();
- StartProcessInstanceCommand startCommand = new StartProcessInstanceCommand();
- startCommand.setProcessId(processDefinition.getId());
- startCommand.setProcessName("processDefinition1");
- ProcessInstance pi = (ProcessInstance)commandService.execute(startCommand);
+ jbpmContext.getGraphSession().deleteProcessDefinition(processDefinition.getId());
+ super.tearDown();
+ }
+
+ public void testAsyncCall() {
+ long start = System.currentTimeMillis();
+
+ startJobExecutor();
+
commitAndCloseSession();
- }
- long stop = System.currentTimeMillis();
- System.out.println("=== Test finished processing " + INSTANCES + " instances in " + (stop - start) + "ms ===");
- System.out.println("=== This is " + Math.round(1000 * INSTANCES / (stop - start)) + " instances per second ===");
- }
+ for (int i = 0; i < INSTANCES; i++) {
+ beginSessionTransaction();
+ NewProcessInstanceCommand startCommand = new NewProcessInstanceCommand();
+ startCommand.setProcessDefinitionId(processDefinition.getId());
+ startCommand.setProcessDefinitionName("processDefinition1");
+ ProcessInstance pi = (ProcessInstance) commandService.execute(startCommand);
- public static class PerfActionHandler implements ActionHandler
- {
- public void execute(ExecutionContext executionContext) throws Exception
- {
- //System.out.println(count);
- }
- }
+ Token token = pi.getRootToken();
+ token.lock(ESB_ASYNC_SIGNAL_ACTION_NAME);
+ final ExecuteActionJob signalJob = new ExecuteActionJob(token);
+
+ signalJob.setAction(signalAction);
+ signalJob.setDueDate(new Date());
+ signalJob.setSuspended(token.isSuspended());
+
+ final MessageService messageService = (MessageService) Services.getCurrentService(Services.SERVICENAME_MESSAGE, true);
+ messageService.send(signalJob);
+
+ commitAndCloseSession();
+ }
+
+ while (signaled.get() < INSTANCES) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ // no problem, computer's fault
+ }
+ }
+
+ stopJobExecutor();
+
+ long stop = System.currentTimeMillis();
+ System.out.println("=== Test finished processing " + INSTANCES + " instances in " + (stop - start) + "ms ===");
+ System.out.println("=== This is " + Math.round(1000 * INSTANCES / (stop - start)) + " instances per second ===");
+ }
+
+ public static class PerfActionHandler implements ActionHandler {
+ private static final long serialVersionUID = -2171981067863454024L;
+ public void execute(ExecutionContext executionContext) throws Exception {
+ //System.out.println(count);
+ count++;
+ }
+ }
+
+ private static class AsyncSignalAction implements ActionHandler {
+ private static final long serialVersionUID = -8617329370138396271L;
+
+ AsyncSignalAction(final String configuration) throws JbpmException {
+ }
+
+ public void execute(final ExecutionContext executionContext)
+ throws Exception {
+ final Token token = executionContext.getToken();
+ final long tokenId = token.getId();
+ token.unlock(ESB_ASYNC_SIGNAL_ACTION_NAME);
+ final JbpmContext jbpmContext = executionContext.getJbpmContext();
+
+ final SignalCommand signalCommand = new SignalCommand(tokenId, null);
+ signalCommand.execute(jbpmContext);
+
+ signaled.incrementAndGet();
+ }
+ }
}
15 years, 2 months
JBoss JBPM SVN: r4094 - in jbpm3/branches/jbpm-3.2.6.GA/modules/core: src/main/java/org/jbpm/db and 2 other directories.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-02-28 22:01:13 -0500 (Sat, 28 Feb 2009)
New Revision: 4094
Modified:
jbpm3/branches/jbpm-3.2.6.GA/modules/core/pom.xml
jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/db/JobSession.java
jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/resources/org/jbpm/db/hibernate.queries.hbm.xml
jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java
Log:
exclude JobSessionDbTest from Sybase test suite
bring back JobSession.findFailedJobs named query
remove unused fields in performance test, display progress
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/core/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/core/pom.xml 2009-03-01 01:59:00 UTC (rev 4093)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/core/pom.xml 2009-03-01 03:01:13 UTC (rev 4094)
@@ -334,6 +334,12 @@
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <!-- [JBPM-2042] failed jobs query fails -->
+ <exclude>org/jbpm/db/JobSessionDbTest.java</exclude>
+ </excludes>
+ </configuration>
</plugin>
</plugins>
</build>
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/db/JobSession.java
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/db/JobSession.java 2009-03-01 01:59:00 UTC (rev 4093)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/java/org/jbpm/db/JobSession.java 2009-03-01 03:01:13 UTC (rev 4094)
@@ -111,23 +111,6 @@
}
}
- /**
- * get all failed jobs. Failed job have a retry count
- * of 0 and the occured exception set.
- */
- public List<Job> findFailedJobs() {
- try {
- List<?> jobs = session.createCriteria(Job.class)
- .add(Restrictions.eq("retries", 0))
- .add(Restrictions.isNotNull("exception"))
- .list();
- return CollectionUtil.checkList(jobs, Job.class);
- }
- catch (HibernateException e) {
- throw new JbpmException("couldn't find failed jobs", e);
- }
- }
-
public void saveJob(Job job) {
try {
session.save(job);
@@ -280,5 +263,19 @@
}
}
+ /**
+ * get all failed jobs. Failed job have a retry count
+ * of 0 and the occured exception set.
+ */
+ public List<Job> findFailedJobs() {
+ try {
+ List<?> jobs = session.getNamedQuery("JobSession.findFailedJobs").list();
+ return CollectionUtil.checkList(jobs, Job.class);
+ }
+ catch (HibernateException e) {
+ throw new JbpmException("could not find failed jobs", e);
+ }
+ }
+
private static Log log = LogFactory.getLog(JobSession.class);
}
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/resources/org/jbpm/db/hibernate.queries.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/resources/org/jbpm/db/hibernate.queries.hbm.xml 2009-03-01 01:59:00 UTC (rev 4093)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/main/resources/org/jbpm/db/hibernate.queries.hbm.xml 2009-03-01 03:01:13 UTC (rev 4094)
@@ -386,6 +386,15 @@
]]>
</query>
+ <query name="JobSession.findFailedJobs">
+ <![CDATA[
+ select job
+ from org.jbpm.job.Job as job
+ where job.retries = 0
+ and job.exception is not null
+ ]]>
+ </query>
+
<!-- related to Tasks -->
<!-- ########################### -->
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java 2009-03-01 01:59:00 UTC (rev 4093)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java 2009-03-01 03:01:13 UTC (rev 4094)
@@ -23,11 +23,8 @@
// $Id$
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jbpm.command.CommandService;
-import org.jbpm.command.StartProcessInstanceCommand;
-import org.jbpm.command.impl.CommandServiceImpl;
+import java.text.NumberFormat;
+
import org.jbpm.db.AbstractDbTestCase;
import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.def.ProcessDefinition;
@@ -43,13 +40,11 @@
* @author mvecera(a)redhat.com
* @author pmacik(a)redhat.com
* @author thomas.diesler(a)jboss.com
+ * @author alex.guizar(a)jboss.com
* @since 18-Feb-2009
*/
public class SimplePerformanceTest extends AbstractDbTestCase
{
- private static final Log log = LogFactory.getLog(SimplePerformanceTest.class);
-
- private CommandService commandService = new CommandServiceImpl(getJbpmConfiguration());
private static final int INSTANCES = 1000;
private static int count;
@@ -82,7 +77,7 @@
{
long start = System.currentTimeMillis();
- for (count = 0; count < INSTANCES; count++)
+ for (count = 1; count <= INSTANCES; count++)
{
ProcessInstance pi = new ProcessInstance(processDefinition);
pi.signal();
@@ -97,9 +92,12 @@
public static class PerfActionHandler implements ActionHandler
{
+ private static final long serialVersionUID = 1L;
+
public void execute(ExecutionContext executionContext) throws Exception
{
- //System.out.println(count);
+ if (count % (INSTANCES / 4) == 0)
+ System.out.println(NumberFormat.getPercentInstance().format((double) count / INSTANCES));
}
}
}
15 years, 2 months
JBoss JBPM SVN: r4093 - jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise.
by do-not-reply@jboss.org
Author: alex.guizar(a)jboss.com
Date: 2009-02-28 20:59:00 -0500 (Sat, 28 Feb 2009)
New Revision: 4093
Modified:
jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/pom.xml
Log:
exclude JBPM1952Test from the PostgreSQL suite
Modified: jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/pom.xml 2009-02-28 23:38:45 UTC (rev 4092)
+++ jbpm3/branches/jbpm-3.2.6.GA/modules/enterprise/pom.xml 2009-03-01 01:59:00 UTC (rev 4093)
@@ -304,6 +304,12 @@
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <!-- [JBPM-1952] SOSE in async fork fails -->
+ <exclude>org/jbpm/enterprise/jbpm1952/JBPM1952Test.java</exclude>
+ </excludes>
+ </configuration>
</plugin>
</plugins>
</build>
15 years, 2 months