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

refactor: adjust cpu's stats #1457

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Conversation

ShiKaiWi
Copy link
Member

Rationale

Only the total cpu usage is implicit if the numbers of cpus are different across the cluster nodes.

Detailed Changes

Introduce the num_cpus in the system stats, and adjust the average cpu_usage to the sum of all the cpus' usage, whose range is [0.0, num_cpus].

Test Plan

Add a new check to ensure the cpu_usage's range to to be [0.0, num_cpus].

Copy link
Contributor

@ZuLiangWang ZuLiangWang left a comment

Choose a reason for hiding this comment

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

LGTM

@ZuLiangWang ZuLiangWang merged commit 07dc201 into apache:main Jan 22, 2024
6 checks passed
@ShiKaiWi ShiKaiWi deleted the fix-system-metrics branch January 23, 2024 01:56
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