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

other: non-normalized process CPU% cleanup and docs #910

Merged
merged 6 commits into from
Nov 21, 2022

Conversation

ClementTsang
Copy link
Owner

@ClementTsang ClementTsang commented Nov 21, 2022

Description

A description of the change, what it does, and why it was made. If relevant (such as any change that modifies the UI), please provide screenshots of the changes:

Some cleanup around the non-normalized process CPU% feature, and updating relevant documentation. Also renames the flag to unnormalized_cpu, though I'm open to changing it.

Issue

If applicable, what issue does this address?

Closes: #

Testing

If relevant, please state how this was tested. All changes must be tested to work:

If this is a code change, please also indicate which platforms were tested:

  • Windows
  • macOS
  • Linux

Checklist

If relevant, ensure the following have been met:

  • Areas your change affects have been linted using rustfmt (cargo fmt)
  • The change has been tested and doesn't appear to cause any unintended breakage
  • Documentation has been added/updated if needed (README.md, help menu, doc pages, etc.)
  • The pull request passes the provided CI pipeline
  • There are no merge conflicts
  • If relevant, new tests were added (don't worry too much about coverage)

@ClementTsang ClementTsang changed the title other: non-normalized CPU cleanup and docs other: non-normalized process CPU% cleanup and docs Nov 21, 2022
pub fn get_process_data(
prev_idle: &mut f64, prev_non_idle: &mut f64,
pid_mapping: &mut FxHashMap<Pid, PrevProcDetails>, use_current_cpu_total: bool,
per_core_percentage: bool, time_difference_in_secs: u64, mem_total_kb: u64, logical_count: u64,
normalization: CpuUsageStrategy, time_difference_in_secs: u64, mem_total_kb: u64,
Copy link
Owner Author

@ClementTsang ClementTsang Nov 21, 2022

Choose a reason for hiding this comment

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

Can also probably combine use_current_cpu_total to CpuUsageStrategy in a later cleanup PR.

@ClementTsang ClementTsang marked this pull request as ready for review November 21, 2022 09:57
@ClementTsang ClementTsang force-pushed the non_normalized_cpu_followup branch 2 times, most recently from a30df3b to 50b7ceb Compare November 21, 2022 10:05
@ClementTsang ClementTsang force-pushed the non_normalized_cpu_followup branch 3 times, most recently from 28400f6 to bdcecf6 Compare November 21, 2022 10:13
@ClementTsang ClementTsang merged commit 4f00434 into master Nov 21, 2022
@ClementTsang ClementTsang deleted the non_normalized_cpu_followup branch November 21, 2022 10:28
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.

1 participant