On Jan 27, 2012, at 20:50 PM, <[email protected]> wrote:

>> Sorry by the simplistic idea, but catching the execution of methods with
>> AOP cannot help to measure their execution time?
> 
> If method a of bundle A calls method b of bundle B, which in turn calls
> InetAddress.getByName(), then the execution time measured for a will
> include the execution time proper to b and the time taken to do the DNS
> lookup.  Separating these out could be tricky.
> 
> Generally speaking a bundle corresponds to a set of packages (either
> exported or private), so your best approach is probably to ask your
> favourite profiler to report results on a package basis.  This breaks down
> of course if a given package name is (privately) present in multiple
> bundles, or when the same jar file is embedded into multiple bundles.

True.

The only special case is if all your bundles communicate with each other via 
services. In that case, if you intercept all service calls, you can use those 
interceptors to measure the time taken inside each bundle. Adding those 
interceptors can be done at runtime.

Greetings, Marcel


_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to