-
Notifications
You must be signed in to change notification settings - Fork 196
feat(monitor): improve power monitor with dynamic collection based on interval #2016
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
Open
sthaha
wants to merge
5
commits into
sustainable-computing-io:reboot
Choose a base branch
from
sthaha:feat-monitor-with-interval
base: reboot
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat(monitor): improve power monitor with dynamic collection based on interval #2016
sthaha
wants to merge
5
commits into
sustainable-computing-io:reboot
from
sthaha:feat-monitor-with-interval
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## reboot #2016 +/- ##
==========================================
+ Coverage 91.50% 92.19% +0.69%
==========================================
Files 17 17
Lines 1000 1050 +50
==========================================
+ Hits 915 968 +53
+ Misses 66 64 -2
+ Partials 19 18 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2163787
to
afff6fd
Compare
This commit modifies the start up behavior. It refactors the service lifecycle management, replacing the Start and Stop methods with * Init: used to initiliaze a service and can assume it isn't called from go routines * Run: Runs the service and blocks until context is cancelled or an error is encountered * `Shutdown`: methods is the cleanup and indicates that you can't call `Run` after `Shutdown`. This change aims to separate initialization which is run serially and allows services to initialize without worrying about thread-safety. I.E. Its okay for an Init() to call another Init(). Thus this change separates initialization, runtime, and cleanup phases for better clarity and control. Tests are updated keep up with the change. Signed-off-by: Sunil Thaha <[email protected]>
afff6fd
to
19e677e
Compare
…anagement This commit replaces sync.RWMutex with atomic.Pointer for thread-safe snapshot access in PowerMonitor. * Move zone initialization to initZones method and defer snapshot creation. * Update calculateNodePower to accept previous node data, decoupling it from snapshot locking. * update tests to reflect new logic. Signed-off-by: Sunil Thaha <[email protected]>
753f1a9
to
7eadf46
Compare
Signed-off-by: Sunil Thaha <[email protected]>
This refactor enhances the power monitoring system with the following improvements: - Implement dynamic collection scheduling with configurable intervals - Add option to disable automatic collection (interval=0) for on-demand only mode - Use a context for clean cancellation of collection goroutines Signed-off-by: Sunil Thaha <[email protected]>
7eadf46
to
629fb42
Compare
Signed-off-by: Sunil Thaha <[email protected]>
105ea67
to
9472e01
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This refactor enhances the monitor as follows: