camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Measure elapsed time of specific process
Date Sat, 20 Jul 2013 08:53:19 GMT
No we are not adding start|stop stopwatch to the DSL. We want the DSL
to be confused on EIPs
http://camel.apache.org/eip

If you want to time something use a processor / bean and call a start
and stop methods

MyStopWatch stopWatch = new MyStopWatch();

.bean(stopWatch, "start")
.process
.bean(stopWatch, "stop")



On Sat, Jul 20, 2013 at 8:05 AM, humayun0156 <humayun0156@gmail.com> wrote:
> Hi, i want to compare time of a specific process. so after google search i
> found the link
> http://cmoulliard.blogspot.com/2011/02/measure-elapsed-time-with-camel.html
> <http://cmoulliard.blogspot.com/2011/02/measure-elapsed-time-with-camel.html>
>
> but i need more specific which @Gregor mention in comment :
> (MyRouteBuilder.java)
> DateTime time;
> from("direct:foo")
> .routeIde("foo")
> .stopWatch("fooTimer").start(time)
> .process(...)
> .stopWatch("fooTimer").stop()
> .log("took " + time.getTime() + "s")
> .end();
>
> is it possible?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Measure-elapsed-time-of-specific-process-tp5735915.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message