Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 658940 - app-portage/genlop: improve current merge time prediction
Summary: app-portage/genlop: improve current merge time prediction
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-06-24 10:39 UTC by Kai Krakow
Modified: 2019-07-06 09:56 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
genlop: Calculate more accurate merge time (0001-genlop-Calculate-more-accurate-merge-time.patch,2.32 KB, patch)
2018-06-24 10:39 UTC, Kai Krakow
Details | Diff
genlop: Calculate more accurate merge time (v2) (v2-0001-genlop-Calculate-more-accurate-merge-time.patch,2.38 KB, patch)
2018-09-11 18:40 UTC, Kai Krakow
Details | Diff
v3: Fix use of uninitialized values (v3-0001-genlop-Calculate-more-accurate-merge-time.patch,2.38 KB, patch)
2019-07-06 09:56 UTC, Kai Krakow
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Krakow 2018-06-24 10:39:18 UTC
Created attachment 537024 [details, diff]
genlop: Calculate more accurate merge time

This patch adds a better merge time prediction by utilizing statistical methods:

1. It considers only the last 10 merges
2. It slice off the worst and best merge times

Find attached a patch with details description.
Comment 1 Kai Krakow 2018-06-24 11:10:07 UTC
Here is an example of the patch in action:

$ genlop -t qtwebengine|fgrep "merge time"
       merge time: 2 hours, 20 minutes and 29 seconds.
       merge time: 1 hour, 23 minutes and 33 seconds.
       merge time: 1 hour, 38 minutes and 59 seconds.
       merge time: 1 hour, 33 minutes and 14 seconds.
       merge time: 1 hour, 54 minutes and 7 seconds.
       merge time: 1 hour, 21 minutes and 49 seconds.
       merge time: 1 hour, 19 minutes and 26 seconds.
       merge time: 1 hour, 48 minutes and 36 seconds.
       merge time: 1 hour, 38 minutes and 37 seconds.
       merge time: 1 hour, 20 minutes and 20 seconds.
       merge time: 2 hours, 26 minutes and 38 seconds.
       merge time: 21 seconds.
       merge time: 1 hour, 24 minutes and 36 seconds.
       merge time: 1 hour, 15 minutes and 4 seconds.
       merge time: 1 hour, 35 minutes.
       merge time: 1 hour, 28 minutes and 50 seconds.
       merge time: 2 hours, 8 minutes and 32 seconds.
       merge time: 59 minutes and 24 seconds.
       merge time: 1 hour, 11 minutes and 33 seconds.
       merge time: 1 hour, 5 minutes and 52 seconds.
       merge time: 2 hours and 27 seconds.
       merge time: 2 hours, 17 minutes and 30 seconds.
       merge time: 2 hours, 44 minutes and 40 seconds.
       merge time: 2 hours, 54 minutes and 16 seconds.
       merge time: 3 hours, 20 minutes and 9 seconds.
       merge time: 2 hours, 21 minutes and 43 seconds.
       merge time: 1 hour, 58 minutes and 33 seconds.
       merge time: 1 hour, 57 minutes and 28 seconds.
       merge time: 2 hours, 28 minutes and 24 seconds.
       merge time: 2 hours, 1 minute and 49 seconds.
       merge time: 1 hour, 44 minutes and 25 seconds.
       merge time: 1 hour, 55 minutes and 9 seconds.

$ ./genlop -c; genlop -c

 Currently merging 17 out of 18

 * dev-qt/qtwebengine-5.9.6

       current merge time: 49 minutes and 41 seconds.
       ETA: 1 hour, 23 minutes and 46 seconds.

 Currently merging 17 out of 18

 * dev-qt/qtwebengine-5.9.6

       current merge time: 49 minutes and 42 seconds.
       ETA: 58 minutes and 24 seconds.


It yields a much better idea of how long the ebuild is going to build.
Comment 2 Kai Krakow 2018-07-02 06:54:25 UTC
This patch currently shows warnings about uninitialized values if less than 10 merges are in the log for one package. I'm not sure how to easily fix this as I'm no perl dev.

So, feel free to fix the patch. Meanwhile, I'll try to come up with some solution later.
Comment 3 Kai Krakow 2018-09-11 18:40:29 UTC
Created attachment 546668 [details, diff]
genlop: Calculate more accurate merge time (v2)

This v2 patch fixes the perl warnings present with the first patch.
Comment 4 Kai Krakow 2019-07-06 09:56:35 UTC
Created attachment 582016 [details, diff]
v3: Fix use of uninitialized values