How do I implement route performance measurement in camel
apache-camel, java, performance
Solution
You've got a lot of choices here, including pursuing your initial idea
1) You can easily hook into Camel's EventNotifier, there is a basic example here http://camel.apache.org/eventnotifier-to-log-details-about-all-sent-exchanges.html
INFO CamelContextFactoryBean - Using custom EventNotifier with id: myLoggingEventNotifier and implementation: org.apache.camel.processor.MyLoggingSentEventNotifer@76bf9e
INFO MyLoggingSentEventNotifer - Took 1001 millis to send to: Endpoint[direct://bar]
INFO MyLoggingSentEventNotifer - Took 0 millis to send to: Endpoint[mock://result]
INFO MyLoggingSentEventNotifer - Took 1013 millis to send to: Endpoint[direct://start]
2) You can use Fuse IDE, example here http://fusesource.com/docs/ide/2.1/tutorials/RiderTutorialTrace.html
3) You can connect to your java instance with JMX and there's a lot of information you can grab from there
Problem
I want to time the performance of steps in my route. I was looking at using camel AOP to start a timer, run the step, stop and log the timer. However AOP is now deprecated, I looked at using the Intercept mechanism, but it just adds 'advice' before, I need it after too. Is there a clean way to do this?