[jbpm-commits] JBoss JBPM SVN: r6259 - in jbpm3/branches/jbpm-3.2-soa/modules/core: src/test/java/org/jbpm/perf and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Apr 15 12:45:50 EDT 2010
Author: alex.guizar at jboss.com
Date: 2010-04-15 12:45:49 -0400 (Thu, 15 Apr 2010)
New Revision: 6259
Modified:
jbpm3/branches/jbpm-3.2-soa/modules/core/pom.xml
jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java
Log:
move surefire.jvm.args property to jdk14 profile in order to allow jdk5+ ergonomics to decide max heap size
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/pom.xml 2010-04-15 15:04:30 UTC (rev 6258)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/pom.xml 2010-04-15 16:45:49 UTC (rev 6259)
@@ -25,11 +25,6 @@
<relativePath>../../pom.xml</relativePath>
</parent>
- <!-- Properties -->
- <properties>
- <surefire.jvm.args>-Xmx128m</surefire.jvm.args>
- </properties>
-
<!-- Dependencies -->
<dependencies>
<!-- Compile Dependencies -->
@@ -225,6 +220,9 @@
<scope>test</scope>
</dependency>
</dependencies>
+ <properties>
+ <surefire.jvm.args>-Xmx128m</surefire.jvm.args>
+ </properties>
</profile>
<!--
Modified: jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java 2010-04-15 15:04:30 UTC (rev 6258)
+++ jbpm3/branches/jbpm-3.2-soa/modules/core/src/test/java/org/jbpm/perf/SimplePerformanceTest.java 2010-04-15 16:45:49 UTC (rev 6259)
@@ -21,8 +21,6 @@
*/
package org.jbpm.perf;
-import java.text.NumberFormat;
-
import org.jbpm.db.AbstractDbTestCase;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
@@ -59,6 +57,16 @@
}
public void testAsyncCall() {
+ Runtime rt = Runtime.getRuntime();
+ System.out.print("Free memory: ");
+ System.out.println(rt.freeMemory());
+ System.out.print("Total memory: ");
+ System.out.println(rt.totalMemory());
+ System.out.print("Max memory: ");
+ System.out.println(rt.maxMemory());
+ System.out.print("Processors: ");
+ System.out.println(rt.availableProcessors());
+
long firstTime = System.currentTimeMillis();
launchProcessInstances(WARMUP_INSTANCES);
processJobs(TIMEOUT);
@@ -68,11 +76,9 @@
processJobs((secondTime - firstTime) * (MEASURED_INSTANCES / WARMUP_INSTANCES + 1));
long duration = System.currentTimeMillis() - secondTime;
- NumberFormat format = NumberFormat.getNumberInstance();
- format.setMaximumFractionDigits(1);
- System.out.println("==> Processed "
- + format.format(1000D * MEASURED_INSTANCES / duration)
- + " instances per second <==");
+ System.out.println("### Processed "
+ + (1000 * MEASURED_INSTANCES / duration)
+ + " instances per second ###");
}
private void launchProcessInstances(int count) {
More information about the jbpm-commits
mailing list