[GLASSFISH-13170] Add log messages for module resolution time Created: 27/Aug/10  Updated: 11/Mar/13  Resolved: 11/Mar/13

Status: Closed
Project: glassfish
Component/s: OSGi
Affects Version/s: 3.1
Fix Version/s: None

Type: Improvement Priority: Critical
Reporter: Tom Mueller Assignee: Sanjeeb Sahoo
Resolution: Invalid Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 13,170

 Description   

To help diagnose the start-up time regression, it would be helpful to know how
long it takes to resolve a particular module. We already have this information for
top-level services using the log messages enabled with the
javax.enterprise.system.core.level=FINE logger setting. However, this doesn't
break down the information to the module level.

This is a request to have module resolution times at the available in log files
for diagnostic purposes.



 Comments   
Comment by Richard S. Hall [ 27/Aug/10 ]

Given that lots of modules can be resolved as a result of resolving a single
module, it may be hard to get precise information, since it may take a long time
to resolve bundle foo because it ended up resolving 100 other bundles.

Comment by Tom Mueller [ 27/Aug/10 ]

In profiling programs, the time consumed by each method is reported as both the
inclusive and exclusive time, i.e., the time including all called methods as well
as the time spent just in this method. A similar design could be used for module
resolution.

Comment by Richard S. Hall [ 27/Aug/10 ]

I don't think it can work like that. It is not like each module has their own
resolve() method that we can use to break it down. There is one resolve process
for the entire framework and that can span multiple modules.

Comment by Tom Mueller [ 06/Mar/12 ]

Bulk update to reassign dochez issue to component lead.

Comment by Sanjeeb Sahoo [ 11/Mar/13 ]

Not possible. See comments by Richard.

Comment by Tom Mueller [ 11/Mar/13 ]

Richard's comment didn't say this was impossible; he just said he didn't think it was doable. However, it is. All that is necessary is keep two timestamps with each module, one that marks the time that module resolution started and another when module resolution finished. Then to print the inclusive time, just take the difference in the timestamps. To print the exclusive time (the time exclusive of dependent modules), just calculate the inclusive time and subtract the inclusive time for each module that the module depends on.

Reopening this so that it can be considered for a future release.

Comment by Sanjeeb Sahoo [ 11/Mar/13 ]

This is what Richard said:

"I don't think it can work like that. It is not like each module has their own
resolve() method that we can use to break it down. There is one resolve process
for the entire framework and that can span multiple modules."

Secondly, modules are resolved by underlying module system, not by glassfish. We support multiple module systems. Equinox resolves all bundles at startup. So, I am not sure what we can do in GlassFish. No point having a request that we will never fix.

Comment by Richard S. Hall [ 11/Mar/13 ]

I don't think this is possible to do. Think of the traveling salesman problem. How would you calculate how much time each specific stop contributed to the overall time consumed while finding a solution?

Generated at Sat Jan 21 15:20:20 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.