diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SEBClientEventBatchService.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SEBClientEventBatchService.java index 087808e2..688ff0a1 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SEBClientEventBatchService.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SEBClientEventBatchService.java @@ -97,11 +97,17 @@ public class SEBClientEventBatchService { initialDelay = 100) public void processEvents() { + final long start = Utils.getMillisecondsNow(); + final int size = this.eventDataQueue.size(); if (size > 1000) { log.warn("-----> There are more then 1000 SEB client logs in the waiting queue: {}", size); } + if (size == 0) { + return; + } + try { this.events.clear(); @@ -131,6 +137,8 @@ public class SEBClientEventBatchService { } catch (final Exception e) { log.error("Failed to process SEB events from eventDataQueue: ", e); } + + System.out.println("************ tuck: " + (Utils.getMillisecondsNow() - start)); } private EventData convertData(final EventData eventData) { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SEBClientPingBatchService.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SEBClientPingBatchService.java index 1b57ca64..81625a41 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SEBClientPingBatchService.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SEBClientPingBatchService.java @@ -52,7 +52,6 @@ public class SEBClientPingBatchService { } final int size = this.pings.size(); - System.out.println("************** size=" + size); if (size > 1000) { log.warn("----> There are more then 1000 SEB client logs in the waiting queue: {}", size); } @@ -89,7 +88,6 @@ public class SEBClientPingBatchService { final long timestamp) { if (connectionToken == null) { - System.out.println("************** connectionToken null"); return; }