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

Rework ZramMeter and remove MeterClass.comprisedValues #1286

Merged
merged 3 commits into from
Aug 29, 2023

Conversation

Explorer09
Copy link
Contributor

The comprisedValues boolean property unnecessarily complicates the drawing algorithms of Bar meters and Graph meters. Since the only user of comprisedValues is ZramMeter, it is better to rework the meter so that it no longer needs comprisedValues.

The values[ZRAM_METER_UNCOMPRESSED] now stores the difference between uncompressed and compressed data size.

Copy link
Member

@BenBE BenBE left a comment

Choose a reason for hiding this comment

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

LGTM.

@BenBE BenBE added enhancement Extension or improvement to existing feature code quality ♻️ Code quality enhancement Linux 🐧 Linux related issues PCP PCP related issues labels Aug 26, 2023
@BenBE BenBE added this to the 3.3.0 milestone Aug 26, 2023
Do not throw FP exceptions if any value in a Meter object is a NaN.

Signed-off-by: Kang-Che Sung <[email protected]>
The 'comprisedValues' boolean property unnecessarily complicates the
drawing algorithms of Bar meters and Graph meters. Since the only user
of 'comprisedValues' is ZramMeter, it is better to rework the meter so
that it no longer needs 'comprisedValues'.

The 'values[ZRAM_METER_UNCOMPRESSED]' now stores the difference between
uncompressed and compressed data size.

Signed-off-by: Kang-Che Sung <[email protected]>
@cgzones cgzones merged commit 68f4f10 into htop-dev:main Aug 29, 2023
11 checks passed
@Explorer09 Explorer09 deleted the zram-meter branch August 30, 2023 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality ♻️ Code quality enhancement enhancement Extension or improvement to existing feature Linux 🐧 Linux related issues PCP PCP related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants