-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Conversation
3b578c8
to
556bc11
Compare
So far, i'm aware of two caveats:
|
Can you add "Fix #115." to the commit message? |
FWIW i've fixed second point (by hardcoding some magic numbers). Will look into failing build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the code looks OK to me. One question I have is how this interacts with restat = 1
removing edges and dyndeps adding and removing edges from the plan during the build. Can tests be added?
I have no idea what
I haven't looked into that yet. |
f34e70d
to
5c3ebdf
Compare
(please don't merge. this is still broken when e.g. ccache is used) |
Hm, and i just realized this is still here. Essentially, this functionality requires that the last execution time, and the time it will take this time, As far as i can tell, the best thing we can do, is to heuristically stop using last execution time Can codeowners here please comment if the functionality this PR provides is acceptable given that drawback? |
This comment was marked as abuse.
This comment was marked as abuse.
So i take, in other words this would be fine. |
5c3ebdf
to
14b88f4
Compare
Okay, rebased. |
5f04500
to
c0af2fc
Compare
This comment was marked as abuse.
This comment was marked as abuse.
src/graph.h
Outdated
|
||
// Historical info: how long did this edge take last time, | ||
// as per .ninja_log, if known? Defaults to -1 if unknown. | ||
int64_t prev_elapsed_time; |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, naked unitless data is a problem, i agree. I would think it would make sense to change
all relevant occurrences at once, so i'm not sure an one-off change is a win?
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main problem with that is that it (and some other changes) goes directly against the current code style,
and having uniform code is generally better, and can be uplifted all at once,
as opposed to having a weird mismatch of different coding styles.
But if the maintainers (@jhasse ? @nico ?) can chime in and review the change as a whole,
i can sure make those changes if they are deemed better by maintainers.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Re build failure: |
044dc50
to
966de6a
Compare
966de6a
to
4a0e197
Compare
4a0e197
to
e0d4ada
Compare
e0d4ada
to
e3734cb
Compare
ping |
|
|
|
|
|
|
|
|
Please do not repeatedly "poke" issues/PRs with content-less comments such as this. Note that there has been activity lately (mostly merging bug fixes and some CI updates). Hopefully there will be more time in the future for such feature PRs to get the attention the need and deserve, but "pings" really do not help. However, given the CI changes lately, a rebase of this PR to adapt to the new configuration is likely useful. |
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.
e3734cb
to
44a402f
Compare
ping. |
Thank you for your hard work and your patience! A great feature :) The pings resulted in me unsubscribing and not being interested in having a look at this PR. Please refrain from doing that next time. |
Wow thank you @jhasse, i had almost given up on this thing :)
Yeah, believe me, i very VERY VERY much know the feeling :( |
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 containsthe 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:
I hope people will find this useful, and it could be merged.
CC @nico
Please let me know which kinds of test coverage this needs?
Fix #115.