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

feat: replace mpstat with reading /prc/stat #6673

Closed

Conversation

TetsuKawa
Copy link
Contributor

@TetsuKawa TetsuKawa commented Mar 22, 2024

Description

This PR changes following:

  • replaces mpstat command with reading /proc/stat for performance.
  • Treads that publish /diagnostics and reading cpu information are separated.

Related links

Tests performed

Confirmed that memory information is almost same as mpstat command.
Confirmed that publish /diagnostics at 1 Hz even when reading some information is timed out.
(This is confirmed by inserting sleep() in function reading some information.)

Confirmed that cpu usage information is almost same as mpstat command.
TODO: exception handling, performance

Notes for reviewers

Interface changes

Effects on system behavior

If it takes long time to read some cpu information, /diagnotics is not the most up-to-date information.
In the case, timeout can be determined only after reading process is completed.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
@github-actions github-actions bot added the component:system System design and integration. (auto-assigned) label Mar 22, 2024
pre-commit-ci bot and others added 13 commits March 22, 2024 08:03
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
@TetsuKawa TetsuKawa added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Apr 15, 2024
TetsuKawa and others added 4 commits April 16, 2024 01:53
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
@TetsuKawa TetsuKawa marked this pull request as ready for review April 15, 2024 17:17
@TetsuKawa TetsuKawa requested a review from ito-san as a code owner April 15, 2024 17:17
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
Copy link

stale bot commented Jun 15, 2024

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the status:stale Inactive or outdated issues. (auto-assigned) label Jun 15, 2024
@mitsudome-r
Copy link
Member

@TetsuKawa @ito-san Do you still need this modification?

@stale stale bot removed the status:stale Inactive or outdated issues. (auto-assigned) label Dec 17, 2024
@TetsuKawa
Copy link
Contributor Author

@mitsudome-r
This is deprecated change.
Thank you for your announcement!

@TetsuKawa TetsuKawa closed this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:system System design and integration. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants