green-metrics-tool

Measure energy and carbon consumption of software

https://github.com/green-coding-solutions/green-metrics-tool

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.5%) to scientific vocabulary

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

interactive mesh interpretability profiles distribution sequences generic projection standardization optim
Last synced: 6 months ago · JSON representation ·

Repository

Measure energy and carbon consumption of software

Basic Info
  • Host: GitHub
  • Owner: green-coding-solutions
  • License: agpl-3.0
  • Language: Python
  • Default Branch: main
  • Homepage: https://metrics.green-coding.io
  • Size: 21.1 MB
Statistics
  • Stars: 220
  • Watchers: 3
  • Forks: 34
  • Open Issues: 63
  • Releases: 39
Topics
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
Created almost 4 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Citation Security

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: - Reproducible measurements through configuration/setup-as-code - POSIX style metric providers for many sensors (RAPL, IPMI, PSU, Docker, Temperature, CPU ...) - Low overhead - Statististical frontend with charts - DEMO - API - DEMO - Cluster setup - Free Hosted service for more precise measurements - Timeline-View: Monitor software projects over time - DEMO for Wagtail / DEMO Overview - Energy ID Score-Cards for software (Also see below)

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 ProcPower 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

Screenshot 2023-10-24 at 10 43 28 AM

Details: Energy ID project page

Screenshots of Single Run View

Screenshots of Comparison View

Supporting Repos

  • A collection of tools we often use to set things up or debug: https://github.com/green-coding-solutions/tools
  • Littel scripts that make working with the GMT easier: https://github.com/green-coding-solutions/gmt-helpers

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.

Owner

  • Name: Green Coding Solutions
  • Login: green-coding-solutions
  • Kind: organization
  • Location: Germany

We create open source tools to measure software energy consumption

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: arne@green-coding.io
    affiliation: Green Coding Solutions GmbH
  - given-names: Dan
    family-names: Mateas
    email: dan@green-coding.io
    affiliation: Green Coding Solutions GmbH
  - given-names: Geerd-Dietger
    family-names: Hoffmann
    email: didi@green-coding.io
    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

GitHub Events

Total
  • Create event: 246
  • Release event: 3
  • Issues event: 88
  • Watch event: 43
  • Delete event: 253
  • Issue comment event: 591
  • Push event: 839
  • Pull request review comment event: 813
  • Pull request review event: 323
  • Pull request event: 509
  • Fork event: 7
Last Year
  • Create event: 246
  • Release event: 3
  • Issues event: 88
  • Watch event: 43
  • Delete event: 253
  • Issue comment event: 591
  • Push event: 839
  • Pull request review comment event: 813
  • Pull request review event: 323
  • Pull request event: 509
  • Fork event: 7

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 2,209
  • Total Committers: 11
  • Avg Commits per committer: 200.818
  • Development Distribution Score (DDS): 0.307
Past Year
  • Commits: 752
  • Committers: 5
  • Avg Commits per committer: 150.4
  • Development Distribution Score (DDS): 0.269
Top Committers
Name Email Commits
Arne Tarara a****e@d****e 1,530
dependabot[bot] 4****] 372
dan-mm 3****m 99
Didi Hoffmann 3****a 92
Danilo Ješić 3****c 42
David d****p 31
Alexandre a****o@g****m 28
Dan M d****n@g****g 10
Sai Teja 4****7 3
alexzurbonsen 8****n 1
Thilo Ettelt t****t@n****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 103
  • Total pull requests: 1,023
  • Average time to close issues: 10 months
  • Average time to close pull requests: 5 days
  • Total issue authors: 12
  • Total pull request authors: 8
  • Average comments per issue: 2.35
  • Average comments per pull request: 1.48
  • Merged pull requests: 814
  • Bot issues: 1
  • Bot pull requests: 532
Past Year
  • Issues: 48
  • Pull requests: 656
  • Average time to close issues: 15 days
  • Average time to close pull requests: 5 days
  • Issue authors: 6
  • Pull request authors: 8
  • Average comments per issue: 2.04
  • Average comments per pull request: 1.45
  • Merged pull requests: 490
  • Bot issues: 1
  • Bot pull requests: 322
Top Authors
Issue Authors
  • ArneTR (43)
  • ribalba (34)
  • davidkopp (15)
  • djesic (2)
  • dan-mm (2)
  • schlichtanders (1)
  • mrchrisadams (1)
  • raits (1)
  • chrischanwz (1)
  • anitaschuettler (1)
  • dependabot[bot] (1)
  • andracs (1)
Pull Request Authors
  • dependabot[bot] (532)
  • ArneTR (358)
  • ribalba (85)
  • davidkopp (36)
  • winniehell (4)
  • Bob-Sideshow (4)
  • pkutschera (2)
  • thiloettelt (2)
Top Labels
Issue Labels
good first issue (15) help wanted (13) enhancement (8) front end (4) bug (4) question (1) dependencies (1) python (1) idea (1)
Pull Request Labels
dependencies (530) python (469) docker (55) github_actions (6) codex (4)

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