diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2012-12-20 09:57:34 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2012-12-20 09:57:34 +0100 |
commit | d1b36d2eae63a4aad321316488c2b8dcee8e9631 (patch) | |
tree | 5d044034635c2dff7dd0836e723b074250a17f78 | |
parent | 79c6c1d042fdad06294f4db57c5b8c91b6a0e5d0 (diff) | |
download | esper-testing-d1b36d2eae63a4aad321316488c2b8dcee8e9631.tar.gz esper-testing-d1b36d2eae63a4aad321316488c2b8dcee8e9631.tar.bz2 esper-testing-d1b36d2eae63a4aad321316488c2b8dcee8e9631.tar.xz esper-testing-d1b36d2eae63a4aad321316488c2b8dcee8e9631.zip |
o More timing logging when running COMMIT.
-rw-r--r-- | src/main/java/io/trygvis/esper/testing/object/ObjectUtil.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/io/trygvis/esper/testing/object/ObjectUtil.java b/src/main/java/io/trygvis/esper/testing/object/ObjectUtil.java index d70e074..0e9912b 100644 --- a/src/main/java/io/trygvis/esper/testing/object/ObjectUtil.java +++ b/src/main/java/io/trygvis/esper/testing/object/ObjectUtil.java @@ -7,6 +7,8 @@ import java.io.*; import java.sql.*; import java.util.concurrent.*; +import static java.lang.System.currentTimeMillis; + public class ObjectUtil { public static <A extends TransactionalActor> ActorRef<A> threadedActor(String threadName, long delay, DataSource dataSource, String name, A actor) { @@ -42,7 +44,10 @@ public class ObjectUtil { } actor.act(c); + long start = currentTimeMillis(); c.commit(); + long end = currentTimeMillis(); + logger.debug("COMMIT performed in in " + (end - start) + "ms."); } catch(SQLException e) { c.rollback(); |