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

feat(meta): track the time spent on meta client methods #11364

Merged
merged 1 commit into from
May 9, 2023

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented May 8, 2023

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

feat(meta): track the tiem spent on meta client methods

Add a TimingFuture that wraps a future with spent time tracking.

To track the spent time for a future fu:
Replace fu.await with: fu.timed(callback).await

Or invoke callback if fu spends more than 200 ms with
fu.timed_ge(Duration::from_millis(200), callback).await

Changelog

Related Issues

@vercel
Copy link

vercel bot commented May 8, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
databend ⬜️ Ignored (Inspect) May 8, 2023 3:07pm

@drmingdrmer drmingdrmer marked this pull request as ready for review May 8, 2023 15:06
@mergify mergify bot added the pr-feature this PR introduces a new feature to the codebase label May 8, 2023
@drmingdrmer drmingdrmer force-pushed the 58-meta-client-add-log branch from fa9d697 to b62fd75 Compare May 8, 2023 15:06
Add a `TimingFuture` that wraps a future with spent time tracking.

To track the spent time for a future `fu`:
Replace `fu.await` with: `fu.timed(callback).await`

Or invoke callback if `fu` spends more than 200 ms with
`fu.timed_ge(Duration::from_millis(200), callback).await`
@drmingdrmer drmingdrmer force-pushed the 58-meta-client-add-log branch from b62fd75 to 838b088 Compare May 8, 2023 15:07
@ariesdevil ariesdevil changed the title feat(meta): track the tiem spent on meta client methods feat(meta): track the time spent on meta client methods May 8, 2023
@drmingdrmer drmingdrmer merged commit d44d509 into databendlabs:main May 9, 2023
@drmingdrmer drmingdrmer deleted the 58-meta-client-add-log branch May 9, 2023 01:12
Dousir9 pushed a commit to Dousir9/databend that referenced this pull request May 10, 2023
…#11364)

Add a `TimingFuture` that wraps a future with spent time tracking.

To track the spent time for a future `fu`:
Replace `fu.await` with: `fu.timed(callback).await`

Or invoke callback if `fu` spends more than 200 ms with
`fu.timed_ge(Duration::from_millis(200), callback).await`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants