You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Se...@troika.ru on 2010/11/29 15:04:11 UTC

Best practices to measure time taken between two points of a route?

Hi there,

I need to take some performance metrics of camel routes.
Is there any best practice to measure time taken to process some part of 
the route between two points of this route? 
I would like my camel routes to stay clean, I mean without logic to take 
performance metrics.


Best Regards,
Sergey Zhemzhitsky
Information Technology Division
Troika Dialog, 4, Romanov lane, Moscow 125009, Russia
Phone. +7 495 2580500 ext. 1246

Re: Best practices to measure time taken between two points of a route?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You can use an InterceptStrategy to do the timing.

See more at:
http://camel.apache.org/advanced-configuration-of-camelcontext-using-spring.html

If you just want to time when sending to some endpoint then you can
use an EventNotifier
http://camel.apache.org/eventnotifier-to-log-details-about-all-sent-exchanges.html

Also JMX contains performance statistics for each step in the route.
So you can also grab it from there.
In the future (Camel 3.x) we will expose these stats as well more
easily from Camel API and from REST.



On Mon, Nov 29, 2010 at 3:04 PM,  <Se...@troika.ru> wrote:
> Hi there,
>
> I need to take some performance metrics of camel routes.
> Is there any best practice to measure time taken to process some part of
> the route between two points of this route?
> I would like my camel routes to stay clean, I mean without logic to take
> performance metrics.
>
>
> Best Regards,
> Sergey Zhemzhitsky
> Information Technology Division
> Troika Dialog, 4, Romanov lane, Moscow 125009, Russia
> Phone. +7 495 2580500 ext. 1246



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/