Estimate emerge time

You can analyze your system’s emerge.log file to find out how long a given package took to compile and also to estimate the time of future compile jobs, or you can use genlop, which is designed for the job.

Example of how it works:

  # genlop -nt kdelibs
Tue May  8 18:26:59 2007 >>> kde-base/kdelibs-3.5.6-r8
merge time: 38 minutes and 6 seconds.

This information can be used to estimate how long an update would take. The tool can be used to calculate the emerge time for a variety of package sets, like a world update, by calling it this way:
Example of emerging world:

# emerge -uDp world | genlop -p
These are the pretended packages: (this may take a while; wait...)
[ebuild     U ] app-office/openoffice-2.2.1 [2.2.0]
[ebuild     U ] media-libs/netpbm-10.39.0 [10.37.0]
Estimated update time: 5 hours, 50 minutes.

Now, what if you have a new package that you didn’t have installed, such as you want to install fluxbox on a machine that previously did not have X installed:
Example of using on a new package:

# emerge -p fluxbox | genlop -p
...
[ebuild  N    ] x11-libs/libXmu-1.0.3  USE="-debug -ipv6"
[ebuild  N    ] x11-apps/xmessage-1.0.1  USE="-debug -xprnt"
...
!!! Error: couldn't get previous merge of xmessage; skipping...
!!! Error: couldn't get previous merge of fluxbox; skipping...
...
!!! Error: fluxbox never merged; estimated time unknown.

Genlop will only reference the packages it knows. If you use the -q option (genlop version >= 0.30.7), an online database running on gentoo.linuxhowtos.org is queried for compile times based on users with an identical CPU to yours.
Above query results in:

# emerge -p fluxbox | genlop -p -q
These are the pretended packages: (this may take a while; wait...) ...
Estimated update time: 38 minutes.

The times are not 100% accurate; it does not respect USE flags or memory speed, hard disk speed, or other factors. However, as the times get averaged over different users, these factors become less important.

Source: Gentoo.org