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

Display CPU Usage progress correctly when <= 0 #38038

Closed
wants to merge 2 commits into from

Conversation

HeenaBansal2009
Copy link
Contributor

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Fixes #38003. The check has been added to display 0 if CPU_usage is <=0.

Information about CI checks: https://clickhouse.com/docs/en/development/continuous-integration/

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jun 14, 2022
@antonio2368 antonio2368 added the can be tested Allows running workflows for external contributors label Jun 14, 2022
@antonio2368 antonio2368 self-assigned this Jun 14, 2022
@antonio2368 antonio2368 changed the title Updated msg_builder to display CPU Usage progress Display CPU Usage progress correctly when <= 0 Jun 14, 2022

profiling_msg_builder << "(";
if (cpu_usage <= 0)
profiling_msg_builder << 0 << " CPU";
Copy link
Member

Choose a reason for hiding this comment

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

It will introduce unwanted jumping effect when two messages

0 CPU
0.1 CPU

will quickly change each other.

It is better to have

0.0 CPU
0.1 CPU

for alignment.

@alexey-milovidov
Copy link
Member

I've accidentally made another PR for the same issue: #38064

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can be tested Allows running workflows for external contributors pr-not-for-changelog This PR should not be mentioned in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CPU usage in client sometimes displaying -0.0
4 participants