-
Notifications
You must be signed in to change notification settings - Fork 19
Added an asset folder and an example for tracking utilization automat… #6
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
base: master
Are you sure you want to change the base?
Conversation
…ically based on CPU utilization percentage
adelcast
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending Sergey's feedback resolution
| import time | ||
| import winreg | ||
|
|
||
| with winreg.OpenKey( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic should be put into a private function but called globally (since you need the path for an import).
| return minutes * 60 | ||
|
|
||
|
|
||
| def loop(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Private function (prefix with underscore).
…ically based on CPU utilization percentage
[x] This contribution adheres to CONTRIBUTING.md.
What does this Pull Request accomplish?
This PR creates a new asset for for examples. It also adds an initial example in the form of a python script that can track utilization automatically based on CPU utilization percentage. New README was added for the asset folder, and existing README was update.
Why should this Pull Request be merged?
This provides a useful script that can be used to mark the system as utilized (or some assets from it) whenever the CPU utilization percentage goes over a specified threshold.
What testing has been done?
The example script has been tested on the supported OS with a SystemLink Client installation.