Skip to content

Commit

Permalink
253 coefficients (#333)
Browse files Browse the repository at this point in the history
* [253] Update coefficients from SPECPower Database (Q1&Q2 2021)

Updates coefficients based on new entries from the SPECpower_ssj2008
results for 2021:

Q1: https://www.spec.org/power_ssj2008/results/res2021q1/
Q2: https://www.spec.org/power_ssj2008/results/res2021q2/

* [253] Updated tests for new coefficients from 7d7ae52

Co-authored-by: David Mytton <david@davidmytton.co.uk>
  • Loading branch information
dtoakley and davidmytton committed Jun 15, 2021
1 parent f1ab719 commit 10784fb
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 68 deletions.
4 changes: 2 additions & 2 deletions packages/app/src/__tests__/App.test.ts
Expand Up @@ -99,8 +99,8 @@ describe('App', () => {
const testAwsAccountName = 'test AWS account'
const testGcpAccountName = 'test GCP account'
const awsCloudConstants = {
maxWatts: 3.46,
minWatts: 0.71,
maxWatts: 3.75,
minWatts: 0.78,
powerUsageEffectiveness: 1.135,
}
const awsEmissionsFactors = {
Expand Down
68 changes: 34 additions & 34 deletions packages/aws/src/__tests__/CostAndUsageReports.test.ts
Expand Up @@ -143,8 +143,8 @@ describe('CostAndUsageReports Service', () => {
timestamp: new Date('2020-11-02'),
serviceEstimates: [
{
kilowattHours: 0.0020702399999999997,
co2e: 8.607126311999999e-7,
kilowattHours: 0.0021065600000000004,
co2e: 8.758128528000001e-7,
usesAverageCPUConstant: true,
cloudProvider: 'AWS',
accountName: '123456789',
Expand All @@ -153,8 +153,8 @@ describe('CostAndUsageReports Service', () => {
region: 'us-east-1',
},
{
kilowattHours: 0.0010351199999999998,
co2e: 4.5564636743999993e-7,
kilowattHours: 0.0010532800000000002,
co2e: 4.6364016336000006e-7,
usesAverageCPUConstant: true,
cloudProvider: 'AWS',
accountName: '123456789',
Expand All @@ -168,8 +168,8 @@ describe('CostAndUsageReports Service', () => {
timestamp: new Date('2020-11-03'),
serviceEstimates: [
{
kilowattHours: 0.0010351199999999998,
co2e: 4.5564636743999993e-7,
kilowattHours: 0.0010532800000000002,
co2e: 4.6364016336000006e-7,
usesAverageCPUConstant: true,
cloudProvider: 'AWS',
accountName: '123456789',
Expand Down Expand Up @@ -208,8 +208,8 @@ describe('CostAndUsageReports Service', () => {
region: 'us-west-1',
},
{
kilowattHours: 0.000013147083333333335,
co2e: 4.612798805416667e-9,
kilowattHours: 0.000014282083333333332,
co2e: 5.011026040416666e-9,
usesAverageCPUConstant: true,
cloudProvider: 'AWS',
accountName: '123456789',
Expand Down Expand Up @@ -288,12 +288,12 @@ describe('CostAndUsageReports Service', () => {
{
accountName: '123456789',
cloudProvider: 'AWS',
co2e: 3.6318323831999994e-7,
co2e: 3.6955487408000006e-7,
cost: 13,
region: 'us-west-2',
serviceName: 'AmazonRDS',
usesAverageCPUConstant: true,
kilowattHours: 0.0010351199999999998,
kilowattHours: 0.0010532800000000002,
},
],
},
Expand Down Expand Up @@ -323,8 +323,8 @@ describe('CostAndUsageReports Service', () => {
timestamp: new Date('2020-10-30'),
serviceEstimates: [
{
kilowattHours: 0.0189318,
co2e: 0.000007870990509,
kilowattHours: 0.0205662,
co2e: 0.000008550500481000001,
usesAverageCPUConstant: true,
cloudProvider: 'AWS',
accountName: '123456789',
Expand Down Expand Up @@ -400,8 +400,8 @@ describe('CostAndUsageReports Service', () => {
timestamp: new Date('2020-10-31'),
serviceEstimates: [
{
kilowattHours: 0.6775231545,
co2e: 0.00028168363909914754,
kilowattHours: 0.6803641503,
co2e: 0.0002828647973079765,
usesAverageCPUConstant: true,
cloudProvider: 'AWS',
accountName: '123456789',
Expand Down Expand Up @@ -451,12 +451,12 @@ describe('CostAndUsageReports Service', () => {
{
accountName: '123456789',
cloudProvider: 'AWS',
co2e: 0.000004151518924875001,
co2e: 0.000004509923436375,
cost: 2,
region: 'us-west-1',
serviceName: 'AmazonECS',
usesAverageCPUConstant: true,
kilowattHours: 0.011832375000000001,
kilowattHours: 0.012853874999999999,
},
{
accountName: '123456789',
Expand Down Expand Up @@ -500,32 +500,32 @@ describe('CostAndUsageReports Service', () => {
{
accountName: '123456789',
cloudProvider: 'AWS',
co2e: 0.00005585136970875,
co2e: 0.00005632924239075,
cost: 10,
region: 'us-west-1',
serviceName: 'AmazonDocDB',
usesAverageCPUConstant: true,
kilowattHours: 0.15918375,
kilowattHours: 0.16054575,
},
{
accountName: '123456789',
cloudProvider: 'AWS',
co2e: 0.00003521725207570733,
co2e: 0.00003536492535383826,
cost: 5,
region: 'us-west-2',
serviceName: 'AmazonEC2',
usesAverageCPUConstant: true,
kilowattHours: 0.10037380066666667,
kilowattHours: 0.10079468893333332,
},
{
accountName: '123456789',
cloudProvider: 'AWS',
co2e: 0.0006165438795025607,
co2e: 0.0006218601175152745,
cost: 25,
region: 'us-west-1',
serviceName: 'AmazonEC2',
usesAverageCPUConstant: true,
kilowattHours: 1.7572311527999998,
kilowattHours: 1.7723831304000002,
},
{
accountName: '123456789',
Expand All @@ -540,12 +540,12 @@ describe('CostAndUsageReports Service', () => {
{
accountName: '123456789',
cloudProvider: 'AWS',
co2e: 0.000006887116695375,
co2e: 0.0000074816879208749995,
cost: 20,
region: 'us-east-1',
serviceName: 'AmazonEC2',
usesAverageCPUConstant: true,
kilowattHours: 0.016565325,
kilowattHours: 0.017995425,
},
],
},
Expand Down Expand Up @@ -589,32 +589,32 @@ describe('CostAndUsageReports Service', () => {
{
accountName: '123456789',
cloudProvider: 'AWS',
co2e: 0.0001214032761030355,
co2e: 0.00012117541047916851,
cost: 10,
region: 'us-west-1',
serviceName: 'AmazonRedshift',
usesAverageCPUConstant: true,
kilowattHours: 0.3460153055,
kilowattHours: 0.34536585850000007,
},
{
accountName: '123456789',
cloudProvider: 'AWS',
co2e: 0.00051136199955456,
co2e: 0.00052033326270464,
cost: 15,
region: 'us-west-1',
serviceName: 'AmazonEC2',
usesAverageCPUConstant: true,
kilowattHours: 1.45744896,
kilowattHours: 1.4830182400000003,
},
{
accountName: '123456789',
cloudProvider: 'AWS',
co2e: 0.000006642430279799999,
co2e: 0.0000072158774982,
cost: 15,
region: 'us-west-1',
serviceName: 'AmazonRDS',
usesAverageCPUConstant: true,
kilowattHours: 0.0189318,
kilowattHours: 0.0205662,
},
],
},
Expand Down Expand Up @@ -682,22 +682,22 @@ describe('CostAndUsageReports Service', () => {
{
accountName: '123456789',
cloudProvider: 'AWS',
co2e: 0.0001464982839139463,
co2e: 0.00014604639719904827,
cost: 40,
region: 'us-east-1',
serviceName: 'AmazonEC2',
usesAverageCPUConstant: true,
kilowattHours: 0.35236686008333334,
kilowattHours: 0.35127995381666666,
},
{
accountName: '123456789',
cloudProvider: 'AWS',
co2e: 0.0000883784746890136,
co2e: 0.00008869316977920002,
cost: 7,
region: 'us-west-1',
serviceName: 'AmazonEC2',
usesAverageCPUConstant: true,
kilowattHours: 0.2518902776,
kilowattHours: 0.25278720000000005,
},
],
},
Expand Down
12 changes: 6 additions & 6 deletions packages/aws/src/domain/AwsFootprintEstimationConstants.ts
Expand Up @@ -15,10 +15,10 @@ import { AWS_REGIONS } from '../lib/AWSRegions'
export const AWS_CLOUD_CONSTANTS: CloudConstantsByProvider = {
SSDCOEFFICIENT: 1.2, // watt hours / terabyte hour
HDDCOEFFICIENT: 0.65, // watt hours / terabyte hour
MEMORY_AVG: 72.99,
MEMORY_AVG: 73.58,
MEMORY_BY_COMPUTE_PROCESSOR: {
// gigaBytes / physical chip
[COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE]: 92.11,
[COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE]: 96.23,
[COMPUTE_PROCESSOR_TYPES.SKYLAKE]: 83.19,
[COMPUTE_PROCESSOR_TYPES.BROADWELL]: 69.65,
[COMPUTE_PROCESSOR_TYPES.HASWELL]: 27.05,
Expand All @@ -40,9 +40,9 @@ export const AWS_CLOUD_CONSTANTS: CloudConstantsByProvider = {
? averageMemoryForProcessors
: AWS_CLOUD_CONSTANTS.MEMORY_AVG
},
MIN_WATTS_AVG: 0.71,
MIN_WATTS_AVG: 0.78,
MIN_WATTS_BY_COMPUTE_PROCESSOR: {
[COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE]: 0.62,
[COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE]: 0.65,
[COMPUTE_PROCESSOR_TYPES.SKYLAKE]: 0.64,
[COMPUTE_PROCESSOR_TYPES.BROADWELL]: 0.71,
[COMPUTE_PROCESSOR_TYPES.HASWELL]: 1,
Expand All @@ -67,9 +67,9 @@ export const AWS_CLOUD_CONSTANTS: CloudConstantsByProvider = {
? averageWattsForProcessors
: AWS_CLOUD_CONSTANTS.MIN_WATTS_AVG
},
MAX_WATTS_AVG: 3.46,
MAX_WATTS_AVG: 3.75,
MAX_WATTS_BY_COMPUTE_PROCESSOR: {
[COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE]: 3.94,
[COMPUTE_PROCESSOR_TYPES.CASCADE_LAKE]: 3.99,
[COMPUTE_PROCESSOR_TYPES.SKYLAKE]: 4.15,
[COMPUTE_PROCESSOR_TYPES.BROADWELL]: 3.68,
[COMPUTE_PROCESSOR_TYPES.HASWELL]: 4.74,
Expand Down
36 changes: 18 additions & 18 deletions packages/azure/src/__tests__/ConsumptionManagement.test.ts
Expand Up @@ -89,8 +89,8 @@ describe('Azure Consumption Management Service', () => {
timestamp: new Date('2020-11-02'),
serviceEstimates: [
{
kilowattHours: 0.09810615,
co2e: 0.000022368202200000002,
kilowattHours: 0.09850905000000001,
co2e: 0.000022460063400000004,
usesAverageCPUConstant: true,
cloudProvider: 'AZURE',
accountName: 'test-subscription',
Expand All @@ -109,8 +109,8 @@ describe('Azure Consumption Management Service', () => {
region: 'EU West',
},
{
kilowattHours: 0.020198324999999996,
co2e: 0.000009538255014749998,
kilowattHours: 0.020281275000000005,
co2e: 0.000009577426493250003,
usesAverageCPUConstant: true,
cloudProvider: 'AZURE',
accountName: 'test-subscription',
Expand All @@ -124,8 +124,8 @@ describe('Azure Consumption Management Service', () => {
timestamp: new Date('2020-11-03'),
serviceEstimates: [
{
kilowattHours: 0.026721749999999996,
co2e: 0.000010589642472749997,
kilowattHours: 0.02684025,
co2e: 0.00001063660319325,
usesAverageCPUConstant: true,
cloudProvider: 'AZURE',
accountName: 'test-subscription',
Expand All @@ -134,8 +134,8 @@ describe('Azure Consumption Management Service', () => {
region: 'US South Central',
},
{
kilowattHours: 0.0641322,
co2e: 0.00002612745828,
kilowattHours: 0.06441659999999999,
co2e: 0.000026243322839999996,
usesAverageCPUConstant: true,
cloudProvider: 'AZURE',
accountName: 'test-subscription',
Expand Down Expand Up @@ -328,12 +328,12 @@ describe('Azure Consumption Management Service', () => {
{
accountName: 'test-subscription',
cloudProvider: 'AZURE',
co2e: 0.000053720031599999995,
co2e: 0.000053775320619,
cost: 20,
region: 'EU North',
serviceName: 'Virtual Machines',
usesAverageCPUConstant: true,
kilowattHours: 0.1700001,
kilowattHours: 0.17017506525,
},
{
accountName: 'test-subscription',
Expand Down Expand Up @@ -491,8 +491,8 @@ describe('Azure Consumption Management Service', () => {
timestamp: new Date('2020-11-02'),
serviceEstimates: [
{
kilowattHours: 0.09810615,
co2e: 0.000022368202200000002,
kilowattHours: 0.09850905000000001,
co2e: 0.000022460063400000004,
usesAverageCPUConstant: true,
cloudProvider: 'AZURE',
accountName: 'test-subscription',
Expand All @@ -511,8 +511,8 @@ describe('Azure Consumption Management Service', () => {
region: 'EU West',
},
{
kilowattHours: 0.020198324999999996,
co2e: 0.000009538255014749998,
kilowattHours: 0.020281275000000005,
co2e: 0.000009577426493250003,
usesAverageCPUConstant: true,
cloudProvider: 'AZURE',
accountName: 'test-subscription',
Expand All @@ -521,8 +521,8 @@ describe('Azure Consumption Management Service', () => {
region: 'US Central',
},
{
kilowattHours: 0.026721749999999996,
co2e: 0.000010589642472749997,
kilowattHours: 0.02684025,
co2e: 0.00001063660319325,
usesAverageCPUConstant: true,
cloudProvider: 'AZURE',
accountName: 'test-subscription',
Expand All @@ -531,8 +531,8 @@ describe('Azure Consumption Management Service', () => {
region: 'US South Central',
},
{
kilowattHours: 0.0641322,
co2e: 0.00002612745828,
kilowattHours: 0.06441659999999999,
co2e: 0.000026243322839999996,
usesAverageCPUConstant: true,
cloudProvider: 'AZURE',
accountName: 'test-subscription',
Expand Down

0 comments on commit 10784fb

Please sign in to comment.