Skip to content

Commit

Permalink
fix(manifests): update manifests with time-sync and mock-observations
Browse files Browse the repository at this point in the history
  • Loading branch information
manushak committed Jul 23, 2024
1 parent 4b20ff0 commit 24d6474
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 7 deletions.
75 changes: 72 additions & 3 deletions manifests/examples/pipelines/pipeline-with-mocks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,36 @@ initialize:
method: MockObservations
path: "builtin"
global-config:
timestamp-from: 2023-07-06T00:00
timestamp-to: 2023-07-06T00:10
timestamp-from: 2023-12-12T00:00
timestamp-to: 2023-12-12T00:10
duration: 60
components:
- cloud/instance-type: A1
generators:
common:
cloud/region: uk-west
common-key: common-val
randint:
cpu/utilization:
min: 1
max: 99
parameter-metadata:
inputs:
timestamp:
description: refers to the time of occurrence of the input
unit: RFC3339
aggregationMethod: none
duration:
description: refers to the duration of the input
unit: seconds
aggregationMethod: sum
cloud/instance-type:
description: type of Cloud Instance name used in the cloud provider APIs
unit: none
aggregationMethod: none
cloud/region:
description: region cloud instance
unit: none
aggregationMethod: none
"interpolate":
method: Interpolation
path: "builtin"
Expand All @@ -35,12 +52,34 @@ initialize:
y: [0.12, 0.32, 0.75, 1.02]
input-parameter: "cpu/utilization"
output-parameter: "cpu-factor"
parameter-metadata:
inputs:
cpu/utilization:
description: refers to CPU utilization.
unit: percentage
aggregationMethod: avg
outputs:
cpu-factor:
description: result of interpolate
unit: kWh
aggregationMethod: avg
"cpu-factor-to-wattage":
method: Multiply
path: builtin
global-config:
input-parameters: ["cpu-factor", "cpu/thermal-design-power"]
output-parameter: "cpu-wattage"
parameter-metadata:
inputs:
cpu/thermal-design-power:
description: thermal design power for a processor
unit: kwh
aggregationMethod: avg
outputs:
cpu-wattage:
description: the energy used by the CPU
unit: kwh
aggregationMethod: sum
"wattage-times-duration":
method: Multiply
path: builtin
Expand All @@ -61,6 +100,16 @@ initialize:
numerator: vcpus-total
denominator: vcpus-allocated
output: vcpu-ratio
parameter-metadata:
inputs:
vcpus-total:
description: total number of vcpus available on a particular resource
unit: count
aggregationMethod: none
vcpus-allocated:
description: number of vcpus allocated to particular resource
unit: count
aggregationMethod: none
"correct-cpu-energy-for-vcpu-ratio":
method: Divide
path: "builtin"
Expand All @@ -77,6 +126,12 @@ initialize:
global-config:
input-parameters: ["cpu-energy-kwh", "grid/carbon-intensity"]
output-parameter: "carbon-operational"
parameter-metadata:
inputs:
grid/carbon-intensity:
description: Carbon intensity for the grid
unit: gCO2eq/kWh
aggregationMethod: avg
"sum-carbon":
path: "builtin"
method: Sum
Expand All @@ -90,6 +145,12 @@ initialize:
method: Sci
global-config:
functional-unit: "requests"
parameter-metadata:
inputs:
requests:
description: expressed the final SCI value
unit: none
aggregationMethod: sum
"time-sync":
method: TimeSync
path: "builtin"
Expand All @@ -98,13 +159,20 @@ initialize:
end-time: "2023-12-12T00:01:00.000Z"
interval: 5
allow-padding: true
parameter-metadata:
inputs:
time-reserved:
description: time reserved for a component
unit: seconds
aggregationMethod: avg
"group-by":
path: builtin
method: GroupBy
tree:
children:
child-1:
pipeline:
- mock-observations
- interpolate
- cpu-factor-to-wattage
- wattage-times-duration
Expand Down Expand Up @@ -156,6 +224,7 @@ tree:
requests: 50
child-2:
pipeline:
- mock-observations
- interpolate
- cpu-factor-to-wattage
- wattage-times-duration
Expand Down
47 changes: 43 additions & 4 deletions manifests/outputs/pipelines/mock-obs-time-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,36 @@ initialize:
path: builtin
method: MockObservations
global-config:
timestamp-from: 2023-07-06T00:00
timestamp-to: 2023-07-06T00:10
timestamp-from: 2023-12-12T00:00
timestamp-to: 2023-12-12T00:10
duration: 60
components:
- cloud/instance-type: A1
generators:
common:
cloud/region: uk-west
common-key: common-val
randint:
cpu/utilization:
min: 1
max: 99
parameter-metadata:
inputs:
timestamp:
description: refers to the time of occurrence of the input
unit: RFC3339
aggregationMethod: none
duration:
description: refers to the duration of the input
unit: seconds
aggregationMethod: sum
cloud/instance-type:
description: type of Cloud Instance name used in the cloud provider APIs
unit: none
aggregationMethod: none
cloud/region:
description: region cloud instance
unit: none
aggregationMethod: none
interpolate:
path: builtin
method: Interpolation
Expand All @@ -37,6 +54,12 @@ initialize:
- 1.02
input-parameter: cpu/utilization
output-parameter: cpu-factor
parameter-metadata:
inputs:
cpu/utilization:
description: refers to CPU utilization.
unit: percentage
aggregationMethod: avg
cpu-factor-to-wattage:
path: builtin
method: Multiply
Expand All @@ -45,6 +68,12 @@ initialize:
- cpu-factor
- cpu/thermal-design-power
output-parameter: cpu-wattage
parameter-metadata:
inputs:
cpu/thermal-design-power:
description: thermal design power for a processor
unit: kwh
aggregationMethod: avg
wattage-times-duration:
path: builtin
method: Multiply
Expand All @@ -67,6 +96,16 @@ initialize:
numerator: vcpus-total
denominator: vcpus-allocated
output: vcpu-ratio
parameter-metadata:
inputs:
vcpus-total:
description: total number of vcpus available on a particular resource
unit: count
aggregationMethod: none
vcpus-allocated:
description: number of vcpus allocated to particular resource
unit: count
aggregationMethod: none
correct-cpu-energy-for-vcpu-ratio:
path: builtin
method: Divide
Expand Down Expand Up @@ -100,7 +139,6 @@ execution:
- "@commitlint/[email protected]"
- "@commitlint/[email protected]"
- "@grnsft/[email protected]"

- "@jest/[email protected]"
- "@types/[email protected]"
- "@types/[email protected]"
Expand Down Expand Up @@ -131,6 +169,7 @@ tree:
children:
child-1:
pipeline:
- mock-observations
- interpolate
- cpu-factor-to-wattage
- wattage-times-duration
Expand Down

0 comments on commit 24d6474

Please sign in to comment.