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

Prevent underflow with CPU time counter #465

Merged
merged 1 commit into from Oct 20, 2022
Merged

Conversation

nox
Copy link
Contributor

@nox nox commented Oct 18, 2022

No description provided.

@lucab
Copy link
Member

lucab commented Oct 20, 2022

Thanks for the PR! I've left a minor comment in review.

Did you hit this in the wild? How did you end up having multiple ProcessCollector inside the same application?

@nox
Copy link
Contributor Author

nox commented Oct 20, 2022

Thanks for the PR! I've left a minor comment in review.

You didn't.

How did you end up having multiple ProcessCollector inside the same application?

You don't need multiple process collectors, only multiple threads collecting the global registry at the same time.

src/process_collector.rs Outdated Show resolved Hide resolved
Signed-off-by: Anthony Ramine <nox@nox.paris>
Copy link
Member

@lucab lucab left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@lucab lucab merged commit a11df02 into tikv:master Oct 20, 2022
@lucab lucab mentioned this pull request Oct 20, 2022
JanBerktold pushed a commit to JanBerktold/rust-prometheus that referenced this pull request Nov 12, 2022
Signed-off-by: Anthony Ramine <nox@nox.paris>

Signed-off-by: Anthony Ramine <nox@nox.paris>
Signed-off-by: Jan Berktold <jberktold@roblox.com>
JanBerktold pushed a commit to JanBerktold/rust-prometheus that referenced this pull request Nov 12, 2022
Signed-off-by: Anthony Ramine <nox@nox.paris>

Signed-off-by: Anthony Ramine <nox@nox.paris>
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.

None yet

2 participants