Django Carbon Measurement Notes
python django carbon
2024-10-07
At work recently, I've been working on some code to measure the bandwidth required to display webpages, and from there calculate the approximate energy usage and carbon output. Here are the links from my notes:
- Greening Digital with Django, a talk by Chris Adams, whose blog is also full of interesting ideas.
-
Faster, leaner, greener: 10x lower website carbon emissions, a talk by Thibaud Colas.
-
codecarbon, a Python package to quantify carbon emissions by instrumenting code (docs here).
-
co2.js, a Javascript package.
-
Since Firefox 104, Firefox has supported measuring power consumption in the browser's profiling tools. See also this interesting post from Fershad Irani.
-
CO2, a Github action to measure CO2 usage as part of a CI run. Some small amount of commentary on this; this tool starts up a Google Lighthouse instance in the CI run, which is very heavy, CPU-intensive software which runs a complete desktop web browser in order to instrument the bytes transferred. This seems very inefficient to me, and trying to find an acceptable alternative is the problem which I've been working on.
-
The Green Software Foundation, and see also the very useful Green Software Maturity Matrix.
- The Green Web Foundation