This is an automated email from the ASF dual-hosted git repository. clebertsuconic pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit a1b3fb3d41567d86fa031685f2101290344e0554 Author: Clebert Suconic <clebertsuco...@apache.org> AuthorDate: Thu Apr 25 15:41:27 2019 -0400 NO-JIRA Adding consumer timing on CLI consumer --- .../activemq/artemis/cli/commands/messages/ConsumerThread.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConsumerThread.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConsumerThread.java index 762147b..f730eb4 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConsumerThread.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConsumerThread.java @@ -177,6 +177,7 @@ public class ConsumerThread extends Thread { consumer = session.createConsumer(destination); } } + long tStart = System.currentTimeMillis(); int count = 0; while (running && received < messageCount) { Message msg = consumer.receive(receiveTimeOut); @@ -217,6 +218,14 @@ public class ConsumerThread extends Thread { session.commit(); } catch (Throwable ignored) { } + + + System.out.println(threadName + " Consumed: " + this.getMessageCount() + " messages"); + long tEnd = System.currentTimeMillis(); + long elapsed = (tEnd - tStart) / 1000; + System.out.println(threadName + " Elapsed time in second : " + elapsed + " s"); + System.out.println(threadName + " Elapsed time in milli second : " + (tEnd - tStart) + " milli seconds"); + } catch (Exception e) { e.printStackTrace(); } finally {