Only show system total cpu usage by default on high core count machines
ClosedPublic

Authored by rappelman on Jun 9 2019, 12:15 PM.

Details

Summary

Currently, the default configuration of showing all individual cores is pretty useless on system with a high number of cores.

This changes the default to only show all individual cores on systems with 8 cores or less, on systems with more cores only the total cpu usage is shown

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
rappelman created this revision.Jun 9 2019, 12:15 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 9 2019, 12:15 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
rappelman requested review of this revision.Jun 9 2019, 12:15 PM
davidedmundson requested changes to this revision.EditedJun 9 2019, 4:33 PM
davidedmundson added a subscriber: davidedmundson.

+1 on the concept.

Currently, the default configuration of showing all individual cores is pretty useless on system with a high number of cores.

Agreed, it's useless. Load gets balanced between cores so having a history per core tells you nothing.

This changes the default to only show all individual cores on systems with 8 cores or less, on systems with more cores only the total cpu usage is shown

If we're going to change it, I'd keep it simple and just change it, rather than having magic behaviour. Especially as it's just a default a user can enable .


Your pattern of the JS "virtuals" is quite nice.

But for isSourceValid it's a bit weird as you leave a mix two completely different styles.

We still have the filter inside onSourceAdded / root.addSource - which effectively is a filter at the correct layer before we start subscribing to the data source.
Then you have isValidSource applying the same filtering that we've already done...on top of this already filtered content.

I don't understand the goal of this bit.

This revision now requires changes to proceed.Jun 9 2019, 4:33 PM
rappelman updated this revision to Diff 59460.Jun 9 2019, 6:22 PM

The reason for isSourceValid was for to allow getting the number of sources/cores, I didn't want to require changing all the other plasmoids by fully replacing the onSourceAdded/addSource logic.

I've updated it to always show the system total and removed the isSourceValid logic

davidedmundson accepted this revision.Jun 14 2019, 6:20 PM
This revision is now accepted and ready to land.Jun 14 2019, 6:20 PM

@rappelman can you please provide your email address so we can land this patch with correct authorship information? Thanks!

robin@icewind.nl

Thanks very much for the nice patch! May it be the first of many. :) Let me know if you need a hand with anything.

This revision was automatically updated to reflect the committed changes.