[Dive4elements-commits] [PATCH] Datacage: Added some time meassuremnt for templating

Wald Commits scm-commit at wald.intevation.org
Thu May 2 17:55:48 CEST 2013


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1367510101 -7200
# Node ID 88fca576e9e62536c4995ce79393837516cddcaa
# Parent  6a63456b99d9a9900765dda27299603afc6f61dd
Datacage: Added some time meassuremnt for templating.

diff -r 6a63456b99d9 -r 88fca576e9e6 artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java	Tue Apr 30 19:27:15 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java	Thu May 02 17:55:01 2013 +0200
@@ -845,9 +845,19 @@
     )
     throws SQLException
     {
-        BuildHelper helper = new BuildHelper(output, connections, parameters);
-
-        helper.build();
+        long startTime = System.currentTimeMillis();
+        try {
+            BuildHelper helper =
+                new BuildHelper(output, connections, parameters);
+            helper.build();
+        }
+        finally {
+            if (log.isDebugEnabled()) {
+                long stopTime = System.currentTimeMillis();
+                log.debug("Building the datacage result took " +
+                    (stopTime-startTime)/1000f + " secs.");
+            }
+        }
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :


More information about the Dive4elements-commits mailing list