Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 316328

Summary: [engine] engine should be more verbose while performing an installation
Product: [Eclipse Project] Equinox Reporter: Helmut J. Haigermoser <helmut.haigermoser>
Component: p2Assignee: Meng Xin Zhu <kane.zhu>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: kane.mx, kane.zhu, leberre, pascal, refsdal.ivar
Version: unspecifiedKeywords: helpwanted
Target Milestone: Juno M5   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 368637    

Description Helmut J. Haigermoser CLA 2010-06-09 11:28:10 EDT
Build Identifier: Helios

I'm trying to modify our progress messages to show the following info:
- amount of artifacts to be downloaded
- amount of IUs to be installed
- amount of configure operations happening
- current download speed
- expected time of the installation being finished

In order to do that I'd love to use some p2 concept. I have some success getting the names of IUs currently being installed from the ProvisioningEventBus, so that would be my preferred distributor of events.

Right now, as a customization, my installation thread publishing the provisioning plan to the proveventbus, and my UI is listening for that plan to look at operands, calculating some numbers.

Some of the information, like how many artifacts have already been installed, can be "derived" from the progress messages an IProgressMonitor gets, but that's highly unstable and I would love to get this from a more reliable source.

And finally, p2 seems to swallow the ecs download statistics once they were retrieved from ecf and were sent out to IProgressMonitors. However, these statistics could ideally be used to calculate yet another event on the prov event bus: Estimated finish time: 12 minutes.

I know, it's not quite possible to calculate the finishing time of the entire phaseset in one phaseset, but we could try to at least estimate when e.g. the collect phase was done...

Having said all this, I'm interesting in helping out here, so please let me know how and what to contribute, so that I can undo my hacks on top of the IProgressMonitor...

Reproducible: Always
Comment 1 Ivar Refsdal CLA 2011-11-01 12:45:09 EDT
I agree with the need for this enhancement. For users it appears that p2 simply 'hangs' while it actually is doing some work such as calculating requirements or downloading prerequisites. This seems to be the case for both p2 ui and p2.director.
Comment 2 Daniel Le Berre CLA 2011-12-16 03:01:52 EST
Note that the "calculating part" is not taking more than one second on an average computer and an average installation right now.

The vast majority of the time is spent downloading the metadata from the update sites.

Unchecking the "contact all update sites" for instance allows you to get a very fast installation experience.

Maybe the message displayed should change over time, e.g.

Downloading metadata from update sites (x out of a total of y)
Computing requirements
....

That would emphasis that the more update sites are activated, the longer it takes before the installation can proceed.
Comment 3 Meng Xin Zhu CLA 2011-12-22 04:19:47 EST
I'm working on this one. "calculating part" is not taking much time, it's unnecessary to report which detail part is calculating. "contact all update sites" option will cause to synchronize the metadata of all available repositories, the time costs on downloading the metadata, not actually calculating dependencies.

The most time costs on downloading artifacts and installing IUs, especially big binary IU for JRE or JDK, so the number of artifacts to be downloaded or already are downloaded, current totally download speed, how many MBs left and estimated time should be useful information for end users to know the installing progress.

I'm planing to publish those kinds of events via provisioning bus, clients(including p2's UI) can register the listener to get the details they are interested in, then customize the progress report. Below are events to be published,

1. the event of phase starts and finishes
2. download events, including how many artifacts to be downloaded, how many artifacts to be downloaded from a specific repository, the mirror request(download) result, download progress event(a wrapper of ProgressStatistics)
3. the events before/after configuring/unconfiguring an IU

Any suggestion let me know.