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

base implementation for pmt continuous observer #276

Merged
merged 5 commits into from
Oct 4, 2024

Conversation

benvanwerkhoven
Copy link
Collaborator

I can't test it locally, but made a base implementation for @loostrum to use/finish.

@loostrum
Copy link
Member

loostrum commented Oct 3, 2024

@benvanwerkhoven with some small changes this seems to work! I don't have write access to this repo, if you're ok with giving me that I'll push the fixes to this branch.

I'm thinking there might be more accurate way to use PMT, but it's a bit different from the current implementation of a continuous observer: with PMT (and powersensor too) you can call read() which returns a state object that contains the current energy counter. After finishing the benchmark, you can call read() again, and the diff of the energy values in the two states is an accurate representation of the energy used. So instead of continuously measuring power and deriving the energy, it's the other way around. I could work on that later, but for now this continuous observer version is very useful and a lot more accurate than the normal benchmark observer.

@benvanwerkhoven
Copy link
Collaborator Author

Great to hear @loostrum ! I've given you push access (thought you already had that, but it appears not :-) )

@benvanwerkhoven benvanwerkhoven marked this pull request as ready for review October 4, 2024 08:31
Copy link

sonarqubecloud bot commented Oct 4, 2024

@benvanwerkhoven benvanwerkhoven merged commit 4c0a877 into master Oct 4, 2024
3 checks passed
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.

2 participants