green-coding-solutions / eco-ci-energy-estimation

Eco CI Energy estimation for Github Actions Runner VMs
https://metrics.green-coding.io/ci-index.html
MIT License
55 stars 16 forks source link

Inconsistend values in display-results and get-measurement if I add manually #20

Closed ArneTR closed 1 year ago

ArneTR commented 1 year ago

@dan-mm

The results of display-results and get-measurement could diverge if some code happens between its call and get-measurement. I think this is unneeded.

I would argue that the calculation is done on the same basis of data, so that they always show the same values or not at all.

An implementation for the latter could be to not re-run the ML model but just take whatever is in the /tmp/eco-ci/energy-total.txt at this point in time

What do you think?

dan-mm commented 1 year ago

Its been refactored to work like this, closing this issue