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

metrics: steal_count documentation doesn't match implementation #5281

Closed
jschwe opened this issue Dec 9, 2022 · 2 comments · Fixed by #5330
Closed

metrics: steal_count documentation doesn't match implementation #5281

jschwe opened this issue Dec 9, 2022 · 2 comments · Fixed by #5330
Labels
A-tokio Area: The main tokio crate M-metrics Module: tokio/runtime/metrics T-docs Topic: documentation

Comments

@jschwe
Copy link
Contributor

jschwe commented Dec 9, 2022

The documentation says:

Returns the number of times the given worker thread stole tasks from another worker thread.

But the actual implementation increments the steal count by the amount of tasks stolen in each steal.
Is the fact that the stealing operation steals in batches an "implementation detail" or should the implementation perhaps be adpated to match the description?

In my opinion actually both metrics are interesting (at least when evaluating the effects of stealing with different batch sizes).

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-metrics Module: tokio/runtime/metrics E-help-wanted Call for participation: Help is requested to fix this issue. T-docs Topic: documentation E-easy Call for participation: Experience needed to fix: Easy / not much labels Dec 13, 2022
@andrewpollack
Copy link

In my opinion actually both metrics are interesting (at least when evaluating the effects of stealing with different batch sizes).

In this case, does it make sense to create a new function in addition to worker_steal_count to capture both metrics?

@jschwe
Copy link
Contributor Author

jschwe commented Dec 31, 2022

In this case, does it make sense to create a new function in addition to worker_steal_count to capture both metrics?

I needed those numbers, so I already did something like this in my fork here and here.

I could add/adjust the missing documentation and open a PR if both metrics are interesting for the wider community.

@Darksonn Darksonn removed E-help-wanted Call for participation: Help is requested to fix this issue. E-easy Call for participation: Experience needed to fix: Easy / not much labels Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-metrics Module: tokio/runtime/metrics T-docs Topic: documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants