-
-
Notifications
You must be signed in to change notification settings - Fork 528
Split DiskIOMeter into disk IO time and rate sub-meters #1763
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
Draft
Explorer09
wants to merge
10
commits into
htop-dev:main
Choose a base branch
from
Explorer09:disk-io-meter-split
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This property distinguishes meters that have a (relatively) fixed "total" value and meters that do not have a definite maximum value. The former meters would be drawn as a "100% stacked bar" or "graph", and the latter could have their "total" values updated automatically in bar meter mode. This commit is a prerequisite for the feature "Graph meter dynamic scaling and percent graph drawing". Signed-off-by: Kang-Che Sung <[email protected]>
If "isPercentChart" of a meter is false, update its "total" value automatically in the bar meter mode. The "total" value is capped to DBL_MAX in order to ensure the division never produces NaN. The newly introduced Meter_computeSum() function will be reused by the feature "Graph meter dynamic scaling and percent graph drawing". Signed-off-by: Kang-Che Sung <[email protected]>
Implement dynamic scaling for Graph meter mode, and separate it from "100% graph" drawing. This is controlled by the "isPercentChart" property of a MeterClass. If "isPercentChart" is true, the meter would be drawn as a "100% graph". Graph meters now expect the "total" value may change, and the newly changed "total" value no longer affects the percent graph drawings of earlier meter values. If "isPercentChart" is false, the meter would be drawn with a dynamic scale. Signed-off-by: Kang-Che Sung <[email protected]>
The meter now has a dynamic scale, and so the "total" value can be updated automatically by the bar meter drawing code. The initial "total" value for LoadAverageMeter is now always the number of active CPUs (processor threads). Signed-off-by: Kang-Che Sung <[email protected]>
The bar meter drawing code can now update the "total" value automatically. Signed-off-by: Kang-Che Sung <[email protected]>
The bar meter drawing code can now update the "total" value automatically. Signed-off-by: Kang-Che Sung <[email protected]>
The new function is named DiskIOUpdateCache(). Allows code reuse.
No change in behavior
b0d8675
to
68ccd1f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Split the
DiskIOMeter
into two,DiskIOTimeMeter
andDiskIORateMeter
, showing the time and the rate separately.The name
DiskIOMeter
is retained but now shows the combined view of time and rate, similar toMemorySwapMeter
.This PR depends on #1721, which introduces an
isPercentChart
property to meters. Note thisisPercentChart
property is different between sub-meters, and it could explain the reason why the split is worth it.