From d1b36d2eae63a4aad321316488c2b8dcee8e9631 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 20 Dec 2012 09:57:34 +0100 Subject: o More timing logging when running COMMIT. --- src/main/java/io/trygvis/esper/testing/object/ObjectUtil.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main') 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 ActorRef 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(); -- cgit v1.2.3