[jboss-svn-commits] JBL Code SVN: r31522 - in labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance: task and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Feb 9 12:45:55 EST 2010
Author: whitingjr
Date: 2010-02-09 12:45:55 -0500 (Tue, 09 Feb 2010)
New Revision: 31522
Modified:
labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/resource/SynchronizeTask.java
labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/task/RecursiveTask.java
Log:
Updated profiling test case.
Moved flush outside of commit.
Modified: labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/resource/SynchronizeTask.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/resource/SynchronizeTask.java 2010-02-09 17:44:32 UTC (rev 31521)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/resource/SynchronizeTask.java 2010-02-09 17:45:55 UTC (rev 31522)
@@ -83,8 +83,18 @@
Assert.assertNotNull(userB);
userB.setFirstname("Ben"+time);
emB.merge(userB);
+ /*Need to flush here to avoid profiling on the class SessionImpl. Otherwise the
+ * profiler generates Mb of profiling data not needed including all methods of
+ * SessionImpl.*/
+ resourceAFlush(emA);
+
+ /* want to detatch the entities in emA persistence context to avoid
+ * expensive flush on later. */
+ emA.clear();
+
/* the commit call will cause hibernate to check for changes to entities,
- * flushing any changes in the queue (write behind) before commit. */
+ * flushing any changes in the queue (write behind) before commit. At this
+ * point only EM B's persistence context has any pending writes. */
transaction.commit();
}
@@ -102,11 +112,11 @@
* This method exists purely for the profiler to separate resource duration
*
*/
-/* private void resourceAFlush(EntityManager entityManager)
+ private void resourceAFlush(EntityManager entityManager)
{
entityManager.flush();
}
- private void resourceBFlush(EntityManager entityManager)
+ /* private void resourceBFlush(EntityManager entityManager)
{
entityManager.flush();
}
Modified: labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/task/RecursiveTask.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/task/RecursiveTask.java 2010-02-09 17:44:32 UTC (rev 31521)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/jbossts/performance/task/RecursiveTask.java 2010-02-09 17:45:55 UTC (rev 31522)
@@ -23,7 +23,6 @@
package org.jboss.jbossts.performance.task;
import java.util.Stack;
-import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;
import javax.persistence.EntityManagerFactory;
More information about the jboss-svn-commits
mailing list