-
Notifications
You must be signed in to change notification settings - Fork 16
feat(plugin-quarch): Adding a new plugin for disk power consumption measurement with a Quarch Module #270
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: main
Are you sure you want to change the base?
Conversation
bb376a6
to
9e12e40
Compare
I don't know why, I just rebased to the last commits on the main branch to update and checks won't pass anymore (like #272). |
96bba49
to
9ffaccb
Compare
plugins/quarch/README.md
Outdated
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.
Thanks for this nice README, please could you adjust your README to follow the template:
https://github.com/alumet-dev/alumet/blob/main/readme/SOURCE_PLUGIN_README_TEMPLATE.md
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.
I’ve updated the README to match the official template but I am not sure it will be enough for you since I only updated metrics part; let me know if anything still doesn’t align, i will change it!
plugins/quarch/src/lib.rs
Outdated
.flush_interval(self.config.flush_interval) | ||
.update_interval(self.config.flush_interval) |
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.
is it relevant to make a difference between both ?
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.
You’re right, there’s no need to keep both if they serve the same purpose. I merge them into a single interval (only flush_interval
).
plugins/quarch/src/lib.rs
Outdated
fn pre_pipeline_start(&mut self, _alumet: &mut alumet::plugin::AlumetPreStart) -> anyhow::Result<()> { | ||
Ok(()) | ||
} | ||
|
||
fn post_pipeline_start(&mut self, _alumet: &mut AlumetPostStart) -> anyhow::Result<()> { | ||
Ok(()) | ||
} |
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.
Are they needed as you return Ok(()) ?
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.
Since these hooks won’t be used, I removed them entirely to keep the codebase clean.
plugins/quarch/src/lib.rs
Outdated
let _ = child.kill(); | ||
let _ = child.wait(); | ||
} | ||
let _ = std::process::Command::new("pkill") |
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.
is pkill
always available ? I mean i always use kill
because i always found the command as available without the need to install it
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.
You're right, I didn't thought about that! I have replaced the code of the stop
hook with a cross-platform approach using kill
instead of pkill
and conditional compilation for Unix.
333202d
to
1865f83
Compare
1865f83
to
0543c23
Compare
- updating README.md: changing metrics part - removing update_interval since it is redundant - removing pre_pipeline_start and post_pipeline_start since they are not used - updating stop hook to make it cross-platform using kill and conditional compilation for Unix
Quarch Plugin: disk power consumption measurement
Context
This PR introduces a new Alumet plugin for measuring disk power consumption using a Quarch Power Analysis Module. The plugin provides real-time power monitoring in watts and is designed to work with Grid'5000 nodes (e.g.,
yeti-4
in Grenoble) or any other devices connected to a Quarch Module.Changes
lib.rs
:source.rs
:quarchpy
and these examples).QuarchSource
for shared access and TCP-based communication with the Quarch device.Development Practices
cargo fmt --check && cargo clippy -p plugin-quarch -- --no-deps
successfully.anyhow
for simple error management andPollError
for source error management.log
crate for logging messages.