Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(config): add missing params to params.ts #521

Merged
merged 3 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Refactor-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ There have also been some changes to the structure of manifest files. Some of th
group-by:
group:
- region
- instance-type
- cloud/instance-type
```

- **Defaults**
Expand Down
74 changes: 74 additions & 0 deletions examples/manifests/asim-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: My Manifest File
description: My First Manifest File 💚
# aggregation:
# metrics:
# - 'carbon'
# type: 'both'
initialize:
outputs: ['yaml', 'csv']
plugins:
group-by:
path: 'builtin'
method: GroupBy
operational-carbon:
path: '@grnsft/if-plugins'
method: Multiply
global-config:
input-parameters: ['cpu/energy', 'grid/carbon-intensity']
output-parameter: 'carbon'
watttime:
path: '@grnsft/if-unofficial-plugins'
method: WattTimeGridEmissions
teads-curve:
path: '@grnsft/if-unofficial-plugins'
method: TeadsCurve
global-config:
interpolation: spline
cloud-metadata:
method: CloudMetadata
path: "@grnsft/if-plugins"
mock-observations:
path: '@grnsft/if-plugins'
method: MockObservations
global-config:
timestamp-from: '2024-03-05T00:00:00.000Z'
timestamp-to: '2024-03-05T00:01:00.000Z'
duration: 10
components:
- name: server-1
cloud/instance-type: Standard_E64_v3
cloud/region: westus3
- name: server-2
cloud/instance-type: Standard_E64_v3
cloud/region: westus3
generators:
common:
cloud/vendor: azure
randint:
cpu/utilization:
min: 1
max: 99
'time-sync':
method: TimeSync
path: "builtin"
global-config:
start-time: '2024-03-05T00:00:00.000Z'
end-time: '2024-03-05T00:01:00.000Z'
interval: 5
allow-padding: true
tree:
pipeline:
- mock-observations
- group-by
- time-sync
- cloud-metadata
- watttime
- teads-curve
- operational-carbon
defaults:
config:
group-by:
group:
- cloud/region
- name
inputs: null
8 changes: 4 additions & 4 deletions examples/manifests/generics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ tree:
cpu/thermal-design-power: 100
inputs:
- timestamp: "2023-12-12T00:00:00.000Z"
instance-type: A1
cloud/instance-type: A1
region: uk-west
duration: 1
cpu/utilization: 50
Expand All @@ -51,20 +51,20 @@ tree:
- timestamp: "2023-12-12T00:00:01.000Z"
duration: 5
cpu/utilization: 20
instance-type: A1
cloud/instance-type: A1
region: uk-west
network/energy: 10
energy: 5
- timestamp: "2023-12-12T00:00:06.000Z"
duration: 7
cpu/utilization: 15
instance-type: A1
cloud/instance-type: A1
region: uk-west
network/energy: 10
energy: 5
- timestamp: "2023-12-12T00:00:13.000Z"
duration: 30
instance-type: A1
cloud/instance-type: A1
region: uk-west
cpu/utilization: 15
network/energy: 10
Expand Down
14 changes: 7 additions & 7 deletions examples/manifests/group-by.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,35 @@ tree:
group-by:
group:
- region
- instance-type
- cloud/instance-type
inputs:
- timestamp: 2023-07-06T00:00
duration: 300
instance-type: A1
cloud/instance-type: A1
region: uk-west
cpu-util: 99
- timestamp: 2023-07-06T05:00
duration: 300
instance-type: A1
cloud/instance-type: A1
region: uk-west
cpu-util: 23
- timestamp: 2023-07-06T10:00
duration: 300
instance-type: A1
cloud/instance-type: A1
region: uk-west
cpu-util: 12
- timestamp: 2023-07-06T00:00 # note this time restarts at the start timstamp
duration: 300
instance-type: B1
cloud/instance-type: B1
region: uk-west
cpu-util: 11
- timestamp: 2023-07-06T05:00
duration: 300
instance-type: B1
cloud/instance-type: B1
region: uk-west
cpu-util: 67
- timestamp: 2023-07-06T10:00
duration: 300
instance-type: B1
cloud/instance-type: B1
region: uk-west
cpu-util: 1
4 changes: 2 additions & 2 deletions examples/manifests/mock-observation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ initialize:
timestamp-to: 2023-07-06T00:10
duration: 60
components:
- instance-type: A1
- instance-type: B1
- cloud/instance-type: A1
- cloud/instance-type: B1
generators:
common:
region: uk-west
Expand Down
34 changes: 17 additions & 17 deletions examples/manifests/nesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tree:
child-0:
defaults:
cpu/thermal-design-power: 100
grid/carbon-intensity: 800
cloud/grid/carbon-intensity: 800
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here

jmcook1186 marked this conversation as resolved.
Show resolved Hide resolved
device/emissions-embodied: 1533.120 # gCO2eq
time-reserved: 3600 # 1hr in seconds
device/expected-lifespan: 94608000 # 3 years in seconds
Expand All @@ -65,26 +65,26 @@ tree:
- sci
inputs:
- timestamp: "2023-12-12T00:00:00.000Z"
instance-type: A1
cloud/instance-type: A1
region: uk-west
duration: 1
cpu/utilization: 50
network/energy: 0.000001
- timestamp: "2023-12-12T00:00:01.000Z"
duration: 5
cpu/utilization: 20
instance-type: A1
cloud/instance-type: A1
region: uk-west
network/energy: 0.000001
- timestamp: "2023-12-12T00:00:06.000Z"
duration: 7
cpu/utilization: 15
instance-type: A1
cloud/instance-type: A1
region: uk-west
network/energy: 0.000001
- timestamp: "2023-12-12T00:00:13.000Z"
duration: 30
instance-type: A1
cloud/instance-type: A1
region: uk-west
cpu/utilization: 15
network/energy: 0.000001
Expand All @@ -106,26 +106,26 @@ tree:
- sci
inputs:
- timestamp: "2023-12-12T00:00:00.000Z"
instance-type: A1
cloud/instance-type: A1
region: uk-west
duration: 1
cpu/utilization: 50
network/energy: 0.000001
- timestamp: "2023-12-12T00:00:01.000Z"
duration: 5
cpu/utilization: 20
instance-type: A1
cloud/instance-type: A1
region: uk-west
network/energy: 0.000001
- timestamp: "2023-12-12T00:00:06.000Z"
duration: 7
cpu/utilization: 15
instance-type: A1
cloud/instance-type: A1
region: uk-west
network/energy: 0.000001
- timestamp: "2023-12-12T00:00:13.000Z"
duration: 30
instance-type: A1
cloud/instance-type: A1
region: uk-west
cpu/utilization: 15
network/energy: 0.000001
Expand All @@ -149,26 +149,26 @@ tree:
- sci
inputs:
- timestamp: "2023-12-12T00:00:00.000Z"
instance-type: A1
cloud/instance-type: A1
region: uk-west
duration: 1
cpu/utilization: 50
network/energy: 0.000001
- timestamp: "2023-12-12T00:00:01.000Z"
duration: 5
cpu/utilization: 20
instance-type: A1
cloud/instance-type: A1
region: uk-west
network/energy: 0.000001
- timestamp: "2023-12-12T00:00:06.000Z"
duration: 7
cpu/utilization: 15
instance-type: A1
cloud/instance-type: A1
region: uk-west
network/energy: 0.000001
- timestamp: "2023-12-12T00:00:13.000Z"
duration: 30
instance-type: A1
cloud/instance-type: A1
region: uk-west
cpu/utilization: 15
network/energy: 0.000001
Expand All @@ -190,26 +190,26 @@ tree:
- sci
inputs:
- timestamp: "2023-12-12T00:00:00.000Z"
instance-type: A1
cloud/instance-type: A1
region: uk-west
duration: 1
cpu/utilization: 50
network/energy: 0.000001
- timestamp: "2023-12-12T00:00:01.000Z"
duration: 5
cpu/utilization: 20
instance-type: A1
cloud/instance-type: A1
region: uk-west
network/energy: 0.000001
- timestamp: "2023-12-12T00:00:06.000Z"
duration: 7
cpu/utilization: 15
instance-type: A1
cloud/instance-type: A1
region: uk-west
network/energy: 0.000001
- timestamp: "2023-12-12T00:00:13.000Z"
duration: 30
instance-type: A1
cloud/instance-type: A1
region: uk-west
cpu/utilization: 15
network/energy: 0.000001
8 changes: 4 additions & 4 deletions examples/manifests/pipeline-demo-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,26 @@ tree:
cpu/name: Intel® Core™ i7-1185G7
inputs:
- timestamp: "2023-12-12T00:00:00.000Z"
instance-type: A1
cloud/instance-type: A1
region: uk-west
duration: 1
cpu/utilization: 50
network/energy: 0.000001
- timestamp: "2023-12-12T00:00:01.000Z"
duration: 5
cpu/utilization: 20
instance-type: A1
cloud/instance-type: A1
region: uk-west
network/energy: 0.000001
- timestamp: "2023-12-12T00:00:06.000Z"
duration: 7
cpu/utilization: 15
instance-type: A1
cloud/instance-type: A1
region: uk-west
network/energy: 0.000001
- timestamp: "2023-12-12T00:00:13.000Z"
duration: 30
instance-type: A1
cloud/instance-type: A1
region: uk-west
cpu/utilization: 15
network/energy: 0.000001
Loading
Loading