Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reliable ETA and progress percentage. #1963

Merged
merged 1 commit into from
Mar 16, 2024

Commits on Oct 10, 2023

  1. Reliable ETA and progress percentage.

    This has been bugging me for *years*. :)
    Count of finished edges isn't a great statistic, it isn't
    really obvious if LLVM will take 8 minues to build, or 10 minutes.
    
    But, it's actually pretty straight-forward to get some
    more useful information. We already know how much time each edge
    has taken, so we could just do the dumb thing, and assume that
    every edge in the plan takes the same amount of time.
    
    Or, we can do better. `.ninja_log` already contains
    the historical data on how long each edge took to produce it's outs,
    so we simply need to ensure that we populate edges with that info,
    and then we can greatly improve our predictions.
    The math is pretty simple i think.
    
    This is largely a port of a similar change i did to LLVM LIT:
    https://reviews.llvm.org/D99073
    
    With this, i get something quite lovely:
    ```
    llvm-project/build-Clang12$ NINJA_STATUS="[%f/%t %p %P][%w + %W] " /repositories/ninja/build-Clang-debug/ninja opt
    [288/2527  11%   4%][00:27 + 08:52] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/AppendingTypeTableBuilder.cpp.o
    ```
    
    I hope people will find this useful, and it could be merged.
    LebedevRI committed Oct 10, 2023
    Configuration menu
    Copy the full SHA
    44a402f View commit details
    Browse the repository at this point in the history