A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

Green Metrics Tool

An open source suite to measure, display and compare software energy and CO2 consumption for containerized software. External power meters as well as RAPL and also ML-estimation models are supported.
https://github.com/green-coding-solutions/green-metrics-tool

Category: Consumption
Sub Category: Computation and Communication

Keywords

carbon-emissions carbon-footprint carbon-measurement climate-change co2-emissions co2-footprint co2-measurement energy-consumption-analysis green-coding green-computing green-software metrics power-consumption power-consumption-measurement sustainability sustainable-software

Keywords from Contributors

carbon-footprint-calculator carbon-footprint-estimation climate-change-mitigation green-energy metrics-gathering sustainable-development-goals transforms measur archiving optimize

Last synced: about 15 hours ago
JSON representation

Repository metadata

Measure energy and carbon consumption of software

README.md

Tests Status - Main

Energy Used (This is the carbon emitted for running our CI-Pipelines to test GMT on Github. Find out more about Eco-CI)

Try in Github Codespaces!

Introduction

The Green Metrics Tool is a developer tool indented for measuring the energy and CO2 consumption of software through a software life cycle analysis (SLCA).

Key features are:

It is designed to re-use existing infrastructure and testing files as much as possible to be easily integrateable into every software repository and create transparency around software energy consumption.

It can orchestrate Docker containers according to a given specificaion in a usage_scenario.yml file.

These containers will be setup on the host system and the testing specification in the usage_scenario.yml will be
run by sending the commands to the containers accordingly.

This repository contains the command line tools to schedule and run the measurement report
as well as a web interface to view the measured metrics in some nice charts.

Frontend

To see the frontend in action and get an idea of what kind of metrics the tool can collect and display go to out Green Metrics Frontend

Documentation

To see the the documentation and how to install and use the tool please go to Green Metrics Tool Documentation

Comparison with other tools

What GMT is not

  • GMT is not a real time monitoring system -> Use CodeCarbon for this
  • GMT is not a LoC optimization system -> Use classic debuggers for this

What GMT is great at

  • Comparing software implementations
    • How much does algorithm A save in carbon vs. Algorithm B
    • How much dies Inferencing with LLama 2 cost in carbon vs. LLama 3.1
    • ...
  • Comparing architectures of whole software systems against each other on service/container level
    • How much do I save with a micoservice approach vs. a monolith architecture?
    • How much does MySQL consume in carbon vs. PostgreSQL
    • ...
  • Understanding the life-cycle of an application
    • Are my emissions rather in CI/CD testing or in development or in running our VM fleet? (See also CarbonDB for this)
    • How much do my Docker builds cost vs. running the application?
    • How much does the training of my AI model cost vs. Inferencing?
  • Tracking and evaluating code sustainability targets
    • How do my carbon emissions for a given software feature develop over time? Are we getting better or worse?
    • Which commit has led to an energy / carbon regression
      And so much more! See the documentation!

Energy ID Scorecards

Details: Energy ID project page

Screenshots of Single Run View




Screenshots of Comparison View


License and Copyright

The Green Metrics Tool is available under open-source AGPL and commercial license agreements. If you determine you cannot meet the requirements of the AGPL, please contact Green Coding Solutions for more information regarding a commercial license.

Citation (CITATION.cff)

cff-version: 1.2.0
title: Green Metrics Tool
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Arne
    family-names: Tarara
    email: [email protected]
    affiliation: Green Coding Solutions GmbH
  - given-names: Dan
    family-names: Mateas
    email: [email protected]
    affiliation: Green Coding Solutions GmbH
  - given-names: Geerd-Dietger
    family-names: Hoffmann
    email: [email protected]
    affiliation: Green Coding Solutions GmbH
repository-code: 'https://github.com/green-coding-solutions/green-metrics-tool'
url: 'https://www.green-coding.io/'
repository: 'https://github.com/green-coding-solutions/'
abstract: >-
  The Green Metrics Tool is a developer tool indented for
  measuring the energy and CO2 consumption of software
  through a software life cycle analysis (SLCA).
keywords:
  - Green Coding
  - 'Software Life Cycle Assessment '
license: AGPL-3.0-or-later

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 8 days ago

Total Commits: 1,936
Total Committers: 10
Avg Commits per committer: 193.6
Development Distribution Score (DDS): 0.32

Commits in past year: 613
Committers in past year: 4
Avg Commits per committer in past year: 153.25
Development Distribution Score (DDS) in past year: 0.347

Name Email Commits
Arne Tarara a****e@d****e 1316
dependabot[bot] 4****] 330
dan-mm 3****m 99
Didi Hoffmann 3****a 84
Danilo Ješić 3****c 42
Alexandre a****o@g****m 28
David d****p 23
Dan M d****n@g****g 10
Sai Teja 4****7 3
alexzurbonsen 8****n 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 176
Total pull requests: 659
Average time to close issues: 9 months
Average time to close pull requests: 6 days
Total issue authors: 12
Total pull request authors: 8
Average comments per issue: 2.34
Average comments per pull request: 1.83
Merged pull request: 572
Bot issues: 0
Bot pull requests: 316

Past year issues: 39
Past year pull requests: 407
Past year average time to close issues: about 1 month
Past year average time to close pull requests: 5 days
Past year issue authors: 7
Past year pull request authors: 6
Past year average comments per issue: 2.62
Past year average comments per pull request: 1.45
Past year merged pull request: 352
Past year bot issues: 0
Past year bot pull requests: 223

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/green-coding-solutions/green-metrics-tool

Top Issue Authors

  • ArneTR (74)
  • ribalba (71)
  • davidkopp (16)
  • dan-mm (4)
  • schlichtanders (2)
  • hellstromme (2)
  • djesic (2)
  • mrchrisadams (1)
  • raits (1)
  • chrischanwz (1)
  • anitaschuettler (1)
  • andracs (1)

Top Pull Request Authors

  • dependabot[bot] (316)
  • ArneTR (254)
  • ribalba (47)
  • davidkopp (22)
  • dan-mm (14)
  • alexzurbonsen (3)
  • Bob-Sideshow (2)
  • thiloettelt (1)

Top Issue Labels

  • good first issue (32)
  • enhancement (23)
  • help wanted (19)
  • idea (4)
  • front end (3)
  • research (3)
  • python (3)
  • bug (2)
  • wontfix (2)
  • question (1)

Top Pull Request Labels

  • dependencies (316)
  • python (278)
  • docker (30)
  • github_actions (8)
  • blocked (2)
  • help wanted (1)
  • wontfix (1)

Dependencies

.github/workflows/tests-bare-metal-main.yml actions
  • ./.github/actions/gmt-pytest * composite
  • actions/checkout v3 composite
  • green-coding-berlin/eco-ci-activity-checker main composite
.github/workflows/tests-vm-main.yml actions
  • ./.github/actions/gmt-pytest * composite
  • actions/checkout v3 composite
  • green-coding-berlin/eco-ci-activity-checker main composite
requirements.txt pypi
  • PyYAML ==6.0
  • pandas ==1.5.2
  • psycopg2 ==2.9.5
requirements-dev.txt pypi
  • pydantic ==1.10.2 development
  • pylint ==2.15.10 development
  • pytest ==7.2.0 development
  • requests ==2.25.1 development
.github/actions/gmt-pytest/action.yml actions
  • actions/setup-python v4 composite
  • docker/login-action v2 composite
  • docker/setup-buildx-action master composite
.github/workflows/build-and-push-containers.yml actions
  • actions/checkout v3 composite
  • docker/login-action v3 composite
  • docker/setup-buildx-action v3 composite
  • docker/setup-qemu-action v3 composite
.github/workflows/tests-eco-ci-energy-estimation.yaml actions
  • ./.github/actions/gmt-pytest * composite
  • actions/checkout v3 composite
  • green-coding-berlin/eco-ci-energy-estimation testing composite
.github/workflows/tests-vm-pr.yml actions
  • ./.github/actions/gmt-pytest * composite
  • actions/checkout v3 composite
  • green-coding-berlin/eco-ci-energy-estimation v2 composite
docker/auxiliary-containers/gcb_playwright/Dockerfile docker
  • mcr.microsoft.com/playwright/python v1.35.0-jammy build
docker/requirements.txt pypi
  • PyYAML ==6.0.1
  • anybadge ==1.14.0
  • fastapi ==0.103.1
  • gunicorn ==21.2.0
  • orjson ==3.9.7
  • pandas ==2.1.0
  • psycopg ==3.1.10
  • schema ==0.7.5
  • scipy ==1.11.2
  • uvicorn ==0.23.2
.github/workflows/build-codespace-container.yml actions
  • docker/build-push-action v2 composite
  • docker/login-action v2 composite
  • docker/setup-buildx-action v3 composite
  • docker/setup-qemu-action v3 composite
.github/workflows/codeql.yml actions
  • actions/checkout v4 composite
  • github/codeql-action/analyze v3 composite
  • github/codeql-action/autobuild v3 composite
  • github/codeql-action/init v3 composite
tests/data/test_cases/subdir_volume_loading/Dockerfile docker
  • alpine latest build
tests/data/test_cases/subdir_volume_loading/subdir/Dockerfile docker
  • alpine latest build
tests/stress-application/Dockerfile docker
  • alpine latest build
.github/workflows/tests-vm-mac.yml actions
  • ./.github/actions/gmt-pytest * composite
  • actions/checkout v4 composite
  • green-coding-solutions/eco-ci-activity-checker v1 composite

Score: 7.859413154693583