[jbpm-commits] JBoss JBPM SVN: r6941 - jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/job/executor.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu May 19 09:03:08 EDT 2011


Author: marco.rietveld
Date: 2011-05-19 09:03:08 -0400 (Thu, 19 May 2011)
New Revision: 6941

Added:
   jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/job/executor/JobExecutorTest.java
Log:
Trying to find a way to measure user time in tests, instead of system time (because of sometimes overloaded test systems). 

Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/job/executor/JobExecutorTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/job/executor/JobExecutorTest.java	                        (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/job/executor/JobExecutorTest.java	2011-05-19 13:03:08 UTC (rev 6941)
@@ -0,0 +1,13 @@
+package org.jbpm.job.executor;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadMXBean;
+
+public class JobExecutorTest {
+
+  public long getUserTime() {
+    ThreadMXBean bean = ManagementFactory.getThreadMXBean();
+    return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadUserTime() : 0L;
+  }
+
+}


Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/job/executor/JobExecutorTest.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native



More information about the jbpm-commits mailing list