Documentation
¶
Overview ¶
Package footprint provides data and functions to estimate the carbon emissions of AWS EC2 instance operation.
Data source: https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/edit#gid=504755275 Data and methodology provided by Teads engineering, under the Creative Commons Attribution 4.0 International License.
Data snapshot date: 2022-08-17
More background on the methodology: https://medium.com/teads-engineering/building-an-aws-ec2-carbon-emissions-dataset-3f0fd76c98ac
Index ¶
- func AWS(regionCode, instanceType string, duration time.Duration) (float64, error)
- func CarbonIntensity(regionCode string) (float64, error)
- func ManufacturingEmissions(ec2InstanceType string) (float64, error)
- func PUE(regionCode string) (float64, error)
- func PowerAt50Percent(ec2InstanceType string) (float64, error)
- type AWSRegion
- type EC2Instance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CarbonIntensity ¶
CarbonIntensity returns the carbon intensity for an AWS region. The return value is the number of grams of CO2 emitted while producing one kilowatt hour of electricity for the data center.
func ManufacturingEmissions ¶
ManufacturingEmissions returns manufacturing emissions for a machine, as an hourly contribution to emissions in grams.
func PUE ¶
PUE returns the power usage effectiveness coefficient for an AWS region. See https://en.wikipedia.org/wiki/Power_usage_effectiveness for details.
func PowerAt50Percent ¶
PowerAt50Percent returns the power consumption at 50% load for an EC2 instance type, in watt.
Types ¶
type AWSRegion ¶
type AWSRegion struct { // CarbonIntensity is the amount of CO2 emitted when producing electricity. // Unit: metric gram per kilowatt hour. CarbonIntensity float64 // PUE is the power usage effectiveness coefficient of the data center. // See https://en.wikipedia.org/wiki/Power_usage_effectiveness for details. PUE float64 }
type EC2Instance ¶
type EC2Instance struct { // WattAt50Percent is the instance power consumtion in Watt at 50% load PowerAt50Percent float64 // ManufacturingEmissionsHourly is the emissions created during production of the // hardware, calculated as contribution to the hourly footprint, in metric grams CO2e. ManufacturingEmissionsHourly float64 }