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: Fix steal_count description and add steal_operations metric #5330

Merged
merged 2 commits into from Jan 27, 2023

Conversation

jschwe
Copy link
Contributor

@jschwe jschwe commented Dec 31, 2022

Motivation

The documentation of steal_count does not match what is actually counted.

Solution

Fix the documentation of steal_count.
Additionally, add steal_operations as a metric to track what steal_count was originally documented to count.
Having both metrics allows us to see some effects of different stealing policies on work-stealing.

Closes #5281

@github-actions github-actions bot added the R-loom Run loom tests on this PR label Dec 31, 2022
@Darksonn Darksonn added A-tokio Area: The main tokio crate M-metrics Module: tokio/runtime/metrics labels Jan 1, 2023
@jschwe
Copy link
Contributor Author

jschwe commented Jan 27, 2023

Friendly ping

Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

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

Thanks.

@Darksonn Darksonn enabled auto-merge (squash) January 27, 2023 15:47
@Darksonn
Copy link
Contributor

Unfortunately there's a rustfmt failure. See our CONTRIBUTING file for the appropriate commands to run rustfmt in our repository.

jschwe and others added 2 commits January 27, 2023 17:03
`steal_count` claimed to be tracking the amount of times a worker
successfully stole tasks, but instead tracked the number of tasks
stolen. Multiple tasks can be stolen at once.
Add the new `steal_operations` metric to be able to track how
many times tasks where stolen.
Tracking both metrics allows us to better gauge effects of
different stealing policies on the work stealing.
@jschwe
Copy link
Contributor Author

jschwe commented Jan 27, 2023

Thanks for the hint! Rebased and re-formatted according to the guidelines.

@Darksonn Darksonn merged commit 1f50c57 into tokio-rs:master Jan 27, 2023
@Darksonn
Copy link
Contributor

Thanks!

@jschwe jschwe deleted the metris_steal_ops branch January 27, 2023 19:48
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Feb 2, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [tokio](https://tokio.rs) ([source](https://github.com/tokio-rs/tokio)) | dependencies | minor | `1.24.2` -> `1.25.0` |
| [tokio](https://tokio.rs) ([source](https://github.com/tokio-rs/tokio)) | dev-dependencies | minor | `1.24.2` -> `1.25.0` |

---

### Release Notes

<details>
<summary>tokio-rs/tokio</summary>

### [`v1.25.0`](https://github.com/tokio-rs/tokio/releases/tag/tokio-1.25.0): Tokio v1.25.0

##### 1.25.0 (January 28, 2023)

##### Fixed

-   rt: fix runtime metrics reporting ([#&#8203;5330])

##### Added

-   sync: add `broadcast::Sender::len` ([#&#8203;5343])

##### Changed

-   fs: increase maximum read buffer size to 2MiB ([#&#8203;5397])

[#&#8203;5330]: tokio-rs/tokio#5330

[#&#8203;5343]: tokio-rs/tokio#5343

[#&#8203;5397]: tokio-rs/tokio#5397

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMTYuMSIsInVwZGF0ZWRJblZlciI6IjM0LjExOS4yIn0=-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1761
Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
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 R-loom Run loom tests on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

metrics: steal_count documentation doesn't match implementation
2 participants