Skip to content

Apply PUE and WUE for the year the usage was incurred - #271

Merged
jnioche merged 2 commits into
mainfrom
claude/aws-pue-wue-by-year-6ea853
Aug 27, 2026
Merged

Apply PUE and WUE for the year the usage was incurred#271
jnioche merged 2 commits into
mainfrom
claude/aws-pue-wue-by-year-6ea853

Conversation

@jnioche

@jnioche jnioche commented Aug 26, 2026

Copy link
Copy Markdown
Member

Fixes #249

AWS publishes PUE and WUE per year, and the figures move noticeably from one year to the next — eu-central-1 went 1.32 → 1.33 → 1.35 → 1.24 across 2022-2025, and its WUE went from 0.01 in 2024 to 0.17 in 2025. Applying a single blanket value skews any report spanning more than the latest year.

What changed

aws-pue-wue.csv is now Geography,RegionID,Year,PUE,WUE with one row per region per year, 2022-2025.

The figures come from the tables on the AWS sustainability page rather than the downloadable aws-wue-pue.csv, which was last updated in December 2025 and stops at 2024. Using the page picks up:

  • the 2025 figures;
  • AWS's restatements of earlier years (e.g. eu-south-2 2024 is 1.07 on the page, 1.09 in the stale CSV);
  • the regions AWS has started reporting on since — London, Paris, Tel Aviv, Bangkok, Osaka — plus PUE for Sydney and Melbourne, which previously had WUE only.

The one thing the page does not carry is the global WUE for 2022 and 2023; those two values are taken from the downloadable CSV, which is noted in the file header.

PWUE keys its lookups by region and year:

  1. exact region id
  2. geography regex (eu-.+, (me|il)-.+, (us|ca|mx)-.+, …)
  3. the new GLOBAL row
  4. the configured default

Within a tier it takes the row for the usage year, falling back to the closest year published for that region. That fallback is what covers recently-reported regions, WUE that only exists from 2024 onwards, and rows with no usable date.

Reading the year: new RowColumn.getYear(), probing ChargePeriodStartline_item_usage_start_dateDateBILLING_PERIOD. All four are read optionally, so the module keeps working across AWS/Azure and NATIVE/FOCUS without adding a required column to columnsNeeded(). It handles Spark timestamps and dates as well as the string forms CSV exports use. LINE_ITEM_USAGE_START_DATE/_END_DATE moved from the AWS FOCUS bridge into CURColumn so the shared module can reach them.

azure-pue-wue.csv takes the same schema with the year left empty — meaning the row applies to every year — since Microsoft does not break its figures down by year.

Notes for reviewers

  • Two behaviour changes. An unknown region now gets the global average for its year (1.14 PUE / 0.12 WUE in 2025) instead of the hardcoded 1.15 with no WUE. As a result the default config key is now a genuine last resort, reachable only for Azure, whose CSV has no GLOBAL row.
  • Regex entries moved from a HashMap<Pattern, Double> to an ordered list. Pattern has identity equality, so once a key carries several years the map would have split one regex across several entries; the list also makes the match order deterministic.
  • il-central-1 used to have a standalone row carrying the Middle East average. It now has its own 2025 figure and falls back to the (me|il)-.+ geography average for earlier years.
  • RowColumnTest is new rather than an addition to ColumnTest, because ColumnTest, CURColumnTest and AzureColumnTest are written against JUnit 4 and the project only ships the Jupiter engine — Surefire skips all three silently. Worth fixing, but separately from this change.

mvn test: 362 tests, all passing.

AWS publishes PUE and WUE per year and the figures move noticeably from one
year to the next, so applying a single blanket value skews any report that
spans more than the most recent year.

aws-pue-wue.csv gains a Year column and now carries the 2022-2025 figures.
They come from the tables on the AWS sustainability page rather than the
downloadable aws-wue-pue.csv, which stopped being updated after 2024 and so
has neither the 2025 figures nor the restatements of earlier years. That
brings in the regions AWS started reporting on since: London, Paris, Tel
Aviv, Bangkok and Osaka, plus PUE for Sydney and Melbourne. The global
average is included as a GLOBAL row and used as a tier below the geography
averages, so an unrecognised region gets the published global figure for its
year instead of the hardcoded default.

PWUE picks the row for the usage year, falling back to the closest year
published for that region - which covers regions reported on recently, WUE
that only exists from 2024, and rows with no usable date. The year comes
from whichever of ChargePeriodStart, line_item_usage_start_date, Date or
BILLING_PERIOD the report carries, all read optionally so the module keeps
working across providers and report formats without requiring a new column.

Microsoft does not break its figures down by year, so azure-pue-wue.csv
takes the same schema with the year left empty, meaning the row applies to
every year.
@jnioche jnioche added this to the 1.3 milestone Aug 26, 2026
@jnioche jnioche added the AWS issues specific to AWS label Aug 26, 2026
@jnioche
jnioche merged commit 38a3341 into main Aug 27, 2026
@jnioche
jnioche deleted the claude/aws-pue-wue-by-year-6ea853 branch August 27, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AWS issues specific to AWS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update PUE/WUE coefficients with data for 2025

1 participant