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

[checkpoints] [small] Split CheckpointBuilder scope #6613

Merged
merged 1 commit into from
Dec 6, 2022
Merged

Conversation

andll
Copy link
Contributor

@andll andll commented Dec 6, 2022

Currently, CheckpointBuilder scope(fka MakeCheckpoint) shows nearly 100% utilization, most likely due to notify_read.

This moves CheckpointBuilder after notify_read and introduces separate scope for notify read only.

This diff also introduces in_scope helper method for futures.

@andll andll requested a review from mwtian December 6, 2022 18:57
@@ -135,3 +138,29 @@ pub fn monitored_scope(name: &'static str) -> Option<MonitoredScopeGuard> {
None
}
}

pub trait ScopeFutureExt: Future + Sized {
fn in_scope(self, name: &'static str) -> ScopeFuture<Self>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we name this in_monitored_scope or something more appropriate, so readers can see its purpose easily?

Copy link
Contributor Author

@andll andll Dec 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed

Currently, CheckpointBuilder scope(fka `MakeCheckpoint`) shows nearly 100% utilization, most likely due to notify_read.

This moves CheckpointBuilder (fka `MakeCheckpoint`) after notify_read and introduces separate scope for notify read only.

This diff also introduces `in_scope` helper method for futures.
@vercel
Copy link

vercel bot commented Dec 6, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
explorer ⬜️ Ignored (Inspect) Dec 6, 2022 at 7:45PM (UTC)

@andll andll enabled auto-merge (squash) December 6, 2022 19:45
@andll andll merged commit 7671f88 into main Dec 6, 2022
@andll andll deleted the andrey-79 branch December 6, 2022 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants