Skip to content

Commit 1252f15

Browse files
authored
Made network carbon data intensity dynamic (#1200)
* Made network carbon data intensity dynamic * Added N to tests
1 parent 0b0b9ab commit 1252f15

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

config.yml.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@ sci:
229229
# The number worldwide for 2024 is 473
230230
# The number 334 that comes as default is for Germany from 2024 and comes from https://app.electricitymaps.com/zone/DE/all/yearly
231231
I: 334
232+
# N is not technically part of the SCI, but we keep the value here for better clustering.
233+
# N is the network energy intensity per transferred data. It transforms values like GB to kWh
234+
# See https://www.green-coding.io/co2-formulas/ for details
235+
N: 0.001875
232236

233237
#optimization:
234238
# ignore:

lib/phase_stats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def build_and_store_phase_stats(run_id, sci=None):
266266
# build the network energy
267267
# network via formula: https://www.green-coding.io/co2-formulas/
268268
# pylint: disable=invalid-name
269-
network_io_in_kWh = Decimal(sum(network_bytes_total)) / 1_000_000_000 * Decimal(0.002651650429449553)
269+
network_io_in_kWh = Decimal(sum(network_bytes_total)) / 1_000_000_000 * Decimal(config['sci']['N'])
270270
network_io_in_uJ = network_io_in_kWh * 3_600_000_000_000
271271
csv_buffer.write(generate_csv_line(run_id, 'network_energy_formula_global', '[FORMULA]', f"{idx:03}_{phase['name']}", network_io_in_uJ, 'TOTAL', None, None, None, None, None, 'uJ'))
272272
# co2 calculations

tests/test-config.yml.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ sci:
104104
RS: 1
105105
TE: 181000
106106
I: 436
107+
N: 0.001875
107108

108109
optimization:
109110
ignore:

0 commit comments

Comments
 (0)