SaadKhan-BCG / CarbonPlugin

Tool to monitor and expose Carbon consumption of apps by region to aid Carbon Aware development
0 stars 0 forks source link

Refactor logic for fetching carbon data to fetch less #9

Closed SaadKhan-BCG closed 1 year ago

SaadKhan-BCG commented 1 year ago

At the moment the logic goes

for each container: get power for each region: get carbon and combine for each time of day: ... as above...

This causes more fetches to the carbon sdk than necessary (we could iterate over the regions independent of container since its the same for each container) I "thinK" we are getting throttled by the sdk under some testing cases hence would be helpful

would also likely improve performance, less unecessary calls