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

Adds ProgressDisplayGenerator. #1333

Merged
merged 2 commits into from
Dec 10, 2018
Merged

Conversation

coollog
Copy link
Contributor

@coollog coollog commented Dec 10, 2018

Part of #1297

ProgressDisplayGenerator generates the displayed text for progress feedback.

@coollog coollog requested a review from a team December 10, 2018 20:59
"> childLeftDown",
"> childRight"),
ProgressDisplayGenerator.generateProgressDisplay(
0.5, Arrays.asList(root, childLeft, childLeftDown, childRight)));
Copy link
Member

@chanseokoh chanseokoh Dec 10, 2018

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

"> childLeftDown",
"> childRight"),
ProgressDisplayGenerator.generateProgressDisplay(
0.5, Arrays.asList(root, childLeft, childLeftDown, childRight)));
Copy link
Member

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.

@coollog coollog merged commit 3ed22cf into master Dec 10, 2018
@coollog coollog deleted the progress-10-ProgressDisplayGenerator branch December 10, 2018 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants