Skip to content

PCP: DynamicMeters: Add Meter Choice framework#1081

Open
smalinux wants to merge 10 commits intohtop-dev:mainfrom
smalinux:ip_pcp_dm
Open

PCP: DynamicMeters: Add Meter Choice framework#1081
smalinux wants to merge 10 commits intohtop-dev:mainfrom
smalinux:ip_pcp_dm

Conversation

@smalinux
Copy link
Copy Markdown
Contributor

Related: #200 && #669

Copy link
Copy Markdown
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.

Not quite happy with the ATTR_UNUSED littered all over the headers when it's actually just an implementation detail for the C files (except when static inline-ing the implementation in the header.

Also the ATTR_UNUSED usage and (void)var;-casts are mixed. Should only use one of both (unless there's an assert forcing the cast).

@smalinux smalinux force-pushed the ip_pcp_dm branch 3 times, most recently from b6aeeba to 7d6d345 Compare September 12, 2022 09:25
@natoscott
Copy link
Copy Markdown
Member

Not quite happy with [...]

+1 - this feedback is more related to PR #200 though isn't it?

@BenBE
Copy link
Copy Markdown
Member

BenBE commented Sep 13, 2022

Not quite happy with [...]

+1 - this feedback is more related to PR #200 though isn't it?

Saw it in the PCP commit, thus mentioned it here. IDK for the same in #200, but would apply there the same; haven't looked into this though.

Note: Just rechecked with #200 and the issue is not present there.

@smalinux smalinux force-pushed the ip_pcp_dm branch 2 times, most recently from c869583 to bc54719 Compare September 15, 2022 00:36
cgzones and others added 10 commits September 15, 2022 03:19
Improves stacktraces in case the function pointer is NULL, mainly useful
for development.

Similar to be568b1 ("Object: assert callbacks exists")
Add support for meters to have different choices, e.g. different sources
, modes, ... , which can be selected by the user.
Add choice support to display IP addresses based on the selected network
interface.

Currently only implemented on Linux and FreeBSD.
Currently only implemented on Linux and FreeBSD.
Use a meter attached data structure instead of static variables, to
uncouple different meters for choice support.
Display the network usage based on the selected network interface.

Currently only implemented on Linux and FreeBSD.
Show the input and maximum temperature of any available libsensors
temperature sensor.

Related: htop-dev#610
Show the input, minimum and maximum fan speed of any available
libsensors fan sensor.
Related: htop-dev#200 && htop-dev#669

Signed-off-by: Sohaib Mohamed <sohaib.amhmd@gmail.com>
Avoid duplicating metric name and descriptor lookups just
for Choice meters as these have already been performed as
part of initialization - use the cached values instead.
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.

4 participants