You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by sabyasachi087 <sa...@gmail.com> on 2016/05/09 05:17:18 UTC

How activemq statistics plugin calculates averageEnqueueTime and other attributes??

I need to find out the average time , a message stays in the queue before it
gets de-queued.

I believe averageEnqueueTime will be the closest attribute that I can use
for the purpose (Please correct me if I am wrong). But the platform I am
using, does not support statistics pluging for now and will be supported in
future.

I want to mock the results , as when the plugin is available there should
not be any difference in the statistics

*PS:* Since time of enqueue and dequeue is logged (DB), I can us these data
to calculate the average time, the message spent in queue, before getting
picked up. 

Thanks in advance
Happy Coding 



--
View this message in context: http://activemq.2283324.n4.nabble.com/How-activemq-statistics-plugin-calculates-averageEnqueueTime-and-other-attributes-tp4711738.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: How activemq statistics plugin calculates averageEnqueueTime and other attributes??

Posted by Timothy Bish <ta...@gmail.com>.
On 05/09/2016 09:11 PM, sabyasachi087 wrote:
> I need to know the exact process involved in calculation of avg enqueue
> time??
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/How-activemq-statistics-plugin-calculates-averageEnqueueTime-and-other-attributes-tp4711738p4711775.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Why not dig into the code and see how it works, it's all open and easy 
to look at on Github

-- 
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: How activemq statistics plugin calculates averageEnqueueTime and other attributes??

Posted by Tim Bain <tb...@alumni.duke.edu>.
Note, BTW, that this doesn't include the time the message is unconsumed in
the consumer' s prefetch buffer.
On May 10, 2016 6:56 AM, "Tim Bain" <tb...@alumni.duke.edu> wrote:

> SUM(DispatchTime - EnqueueTime)/COUNT
>
> The computation is done here:
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.activemq/activemq-broker/5.11.1/org/apache/activemq/broker/region/RegionBroker.java#RegionBroker.preProcessDispatch%28org.apache.activemq.command.MessageDispatch%29
> On May 9, 2016 9:42 PM, "sabyasachi087" <sa...@gmail.com> wrote:
>
> I need to know the exact process involved in calculation of avg enqueue
> time??
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/How-activemq-statistics-plugin-calculates-averageEnqueueTime-and-other-attributes-tp4711738p4711775.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: How activemq statistics plugin calculates averageEnqueueTime and other attributes??

Posted by Tim Bain <tb...@alumni.duke.edu>.
SUM(DispatchTime - EnqueueTime)/COUNT

The computation is done here:
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.activemq/activemq-broker/5.11.1/org/apache/activemq/broker/region/RegionBroker.java#RegionBroker.preProcessDispatch%28org.apache.activemq.command.MessageDispatch%29
On May 9, 2016 9:42 PM, "sabyasachi087" <sa...@gmail.com> wrote:

I need to know the exact process involved in calculation of avg enqueue
time??



--
View this message in context:
http://activemq.2283324.n4.nabble.com/How-activemq-statistics-plugin-calculates-averageEnqueueTime-and-other-attributes-tp4711738p4711775.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: How activemq statistics plugin calculates averageEnqueueTime and other attributes??

Posted by sabyasachi087 <sa...@gmail.com>.
I need to know the exact process involved in calculation of avg enqueue
time??



--
View this message in context: http://activemq.2283324.n4.nabble.com/How-activemq-statistics-plugin-calculates-averageEnqueueTime-and-other-attributes-tp4711738p4711775.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: How activemq statistics plugin calculates averageEnqueueTime and other attributes??

Posted by Tim Bain <tb...@alumni.duke.edu>.
So what's your question?
On May 9, 2016 7:54 AM, "sabyasachi087" <sa...@gmail.com> wrote:

> I need to find out the average time , a message stays in the queue before
> it
> gets de-queued.
>
> I believe averageEnqueueTime will be the closest attribute that I can use
> for the purpose (Please correct me if I am wrong). But the platform I am
> using, does not support statistics pluging for now and will be supported in
> future.
>
> I want to mock the results , as when the plugin is available there should
> not be any difference in the statistics
>
> *PS:* Since time of enqueue and dequeue is logged (DB), I can us these data
> to calculate the average time, the message spent in queue, before getting
> picked up.
>
> Thanks in advance
> Happy Coding
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/How-activemq-statistics-plugin-calculates-averageEnqueueTime-and-other-attributes-tp4711738.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>