This is an automated email from the ASF dual-hosted git repository.

bchapuis pushed a commit to branch mbtiles-perf
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git


The following commit(s) were added to refs/heads/mbtiles-perf by this push:
     new 3f053263 Clean logs
3f053263 is described below

commit 3f053263fe3d70193c8f01659bca48957fbcb6c2
Author: Bertil Chapuis <[email protected]>
AuthorDate: Wed Aug 23 17:21:52 2023 +0200

    Clean logs
---
 .../org/apache/baremaps/tilestore/postgres/PostgresTileStore.java   | 6 +++---
 .../src/main/java/org/apache/baremaps/utils/PostgresUtils.java      | 2 --
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/tilestore/postgres/PostgresTileStore.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/tilestore/postgres/PostgresTileStore.java
index 25f862d2..7b4f75fb 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/tilestore/postgres/PostgresTileStore.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/tilestore/postgres/PostgresTileStore.java
@@ -119,10 +119,10 @@ public class PostgresTileStore implements TileStore {
         }
         long stop = System.currentTimeMillis();
         long duration = stop - start;
-        if (duration > 1000) {
+
+        // Log slow queries (> 10s)
+        if (duration > 10_000) {
           logger.warn("Executed query for tile {} in {} ms: {}", tileCoord, 
duration, sql);
-        } else {
-          logger.debug("Executed query for tile {} in {} ms: {}", tileCoord, 
duration, sql);
         }
       }
 
diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/utils/PostgresUtils.java 
b/baremaps-core/src/main/java/org/apache/baremaps/utils/PostgresUtils.java
index fd85bbd7..e1768a15 100644
--- a/baremaps-core/src/main/java/org/apache/baremaps/utils/PostgresUtils.java
+++ b/baremaps-core/src/main/java/org/apache/baremaps/utils/PostgresUtils.java
@@ -64,10 +64,8 @@ public final class PostgresUtils {
       throw new IllegalArgumentException("PoolSize cannot be inferior to 1");
     }
     HikariConfig config = new HikariConfig();
-    config.setPoolName("baremaps");
     config.setJdbcUrl(url);
     config.setMaximumPoolSize(poolSize);
-    logger.info("HikariConfig: {}", config);
     return new HikariDataSource(config);
   }
 

Reply via email to