-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Adds ProgressDisplayGenerator. #1333
Conversation
"> childLeftDown", | ||
"> childRight"), | ||
ProgressDisplayGenerator.generateProgressDisplay( | ||
0.5, Arrays.asList(root, childLeft, childLeftDown, childRight))); |
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.
Hmm... looks like a caller should enumerate all unfinished allocations. So I think the caller will go over every node in the tree and identify which node is unfinished. Knowing that, is it not easy for the caller to identify leaves and pass only leaves?
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.
The caller would be the one that gets the unfinished allocations from ProgressEventHandler#getUnfinishedAllocations
, which gets it from AllocationCompletionTracker
. I believe we could have AllocationCompletionTracker
just give back the leaf allocations so that the set computation can be optimized away. I'll make a TODO for this optimization.
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.
Yeah, I think that'd be nice.
...common/src/main/java/com/google/cloud/tools/jib/plugins/common/ProgressDisplayGenerator.java
Outdated
Show resolved
Hide resolved
"> childLeftDown", | ||
"> childRight"), | ||
ProgressDisplayGenerator.generateProgressDisplay( | ||
0.5, Arrays.asList(root, childLeft, childLeftDown, childRight))); |
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.
Yeah, I think that'd be nice.
Part of #1297
ProgressDisplayGenerator
generates the displayed text for progress feedback.