Skip to content

Commit

Permalink
chore(src): fetch changes from distinct execution
Browse files Browse the repository at this point in the history
  • Loading branch information
narekhovhannisyan committed Jul 30, 2024
2 parents 49a42d5 + d7a8853 commit e53e9fe
Show file tree
Hide file tree
Showing 40 changed files with 682 additions and 293 deletions.
92 changes: 48 additions & 44 deletions manifests/examples/pipelines/nesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,18 @@ tree:
vcpus-allocated: 1
vcpus-total: 8
pipeline:
- interpolate
- cpu-factor-to-wattage
- wattage-times-duration
- wattage-to-energy-kwh
- calculate-vcpu-ratio
- correct-cpu-energy-for-vcpu-ratio
- sci-embodied
- operational-carbon
- sum-carbon
- time-sync
- sci
compute:
- interpolate
- cpu-factor-to-wattage
- wattage-times-duration
- wattage-to-energy-kwh
- calculate-vcpu-ratio
- correct-cpu-energy-for-vcpu-ratio
- sci-embodied
- operational-carbon
- sum-carbon
- time-sync
- sci
inputs:
- timestamp: "2023-12-12T00:00:00.000Z"
cloud/instance-type: A1
Expand Down Expand Up @@ -145,17 +146,18 @@ tree:
vcpus-allocated: 1
vcpus-total: 8
pipeline:
- interpolate
- cpu-factor-to-wattage
- wattage-times-duration
- wattage-to-energy-kwh
- calculate-vcpu-ratio
- correct-cpu-energy-for-vcpu-ratio
- sci-embodied
- operational-carbon
- sum-carbon
- time-sync
- sci
compute:
- interpolate
- cpu-factor-to-wattage
- wattage-times-duration
- wattage-to-energy-kwh
- calculate-vcpu-ratio
- correct-cpu-energy-for-vcpu-ratio
- sci-embodied
- operational-carbon
- sum-carbon
- time-sync
- sci
inputs:
- timestamp: "2023-12-12T00:00:00.000Z"
cloud/instance-type: A1
Expand Down Expand Up @@ -197,17 +199,18 @@ tree:
vcpus-allocated: 1
vcpus-total: 8
pipeline:
- interpolate
- cpu-factor-to-wattage
- wattage-times-duration
- wattage-to-energy-kwh
- calculate-vcpu-ratio
- correct-cpu-energy-for-vcpu-ratio
- sci-embodied
- operational-carbon
- sum-carbon
- time-sync
- sci
compute:
- interpolate
- cpu-factor-to-wattage
- wattage-times-duration
- wattage-to-energy-kwh
- calculate-vcpu-ratio
- correct-cpu-energy-for-vcpu-ratio
- sci-embodied
- operational-carbon
- sum-carbon
- time-sync
- sci
inputs:
- timestamp: "2023-12-12T00:00:00.000Z"
cloud/instance-type: A1
Expand Down Expand Up @@ -247,17 +250,18 @@ tree:
vcpus-allocated: 1
vcpus-total: 8
pipeline:
- interpolate
- cpu-factor-to-wattage
- wattage-times-duration
- wattage-to-energy-kwh
- calculate-vcpu-ratio
- correct-cpu-energy-for-vcpu-ratio
- sci-embodied
- operational-carbon
- sum-carbon
- time-sync
- sci
compute:
- interpolate
- cpu-factor-to-wattage
- wattage-times-duration
- wattage-to-energy-kwh
- calculate-vcpu-ratio
- correct-cpu-energy-for-vcpu-ratio
- sci-embodied
- operational-carbon
- sum-carbon
- time-sync
- sci
inputs:
- timestamp: "2023-12-12T00:00:00.000Z"
cloud/instance-type: A1
Expand Down
186 changes: 99 additions & 87 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
duration: 60
timestamp-from: "2023-12-12T00:00:00.000Z"
timestamp-to: "2023-12-12T00:00:13.000Z"
duration: 30
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
aggregation-method: none
duration:
description: refers to the duration of the input
unit: seconds
aggregation-method: sum
cloud/instance-type:
description: type of Cloud Instance name used in the cloud provider APIs
unit: none
aggregation-method: none
cloud/region:
description: region cloud instance
unit: none
aggregation-method: 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
aggregation-method: avg
outputs:
cpu-factor:
description: result of interpolate
unit: kWh
aggregation-method: 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
aggregation-method: avg
outputs:
cpu-wattage:
description: the energy used by the CPU
unit: kwh
aggregation-method: 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
aggregation-method: none
vcpus-allocated:
description: number of vcpus allocated to particular resource
unit: count
aggregation-method: 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
aggregation-method: 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
aggregation-method: sum
"time-sync":
method: TimeSync
path: "builtin"
Expand All @@ -98,29 +159,27 @@ initialize:
end-time: "2023-12-12T00:01:00.000Z"
interval: 5
allow-padding: true
"group-by":
path: builtin
method: GroupBy
tree:
children:
child-1:
pipeline:
- interpolate
- cpu-factor-to-wattage
- wattage-times-duration
- wattage-to-energy-kwh
- calculate-vcpu-ratio
- correct-cpu-energy-for-vcpu-ratio
- sci-embodied
- operational-carbon
- sum-carbon
- time-sync
- sci
config:
group-by:
group:
- cloud/region
- instance-type
observe:
- mock-observations
regroup:
- cloud/region
- cloud/instance-type
compute:
- interpolate
- cpu-factor-to-wattage
- wattage-times-duration
- wattage-to-energy-kwh
- calculate-vcpu-ratio
- correct-cpu-energy-for-vcpu-ratio
- sci-embodied
- operational-carbon
- sum-carbon
- time-sync
- sci
defaults:
cpu/thermal-design-power: 100
grid/carbon-intensity: 800
Expand All @@ -130,48 +189,25 @@ tree:
vcpus-total: 8
vcpus-allocated: 1
inputs:
- timestamp: "2023-12-12T00:00:00.000Z"
cloud/instance-type: A1
cloud/region: uk-west
duration: 1
cpu/utilization: 10
requests: 30
- timestamp: "2023-12-12T00:00:01.000Z"
duration: 5
cpu/utilization: 20
cloud/instance-type: A1
cloud/region: uk-west
requests: 40
- timestamp: "2023-12-12T00:00:06.000Z"
duration: 7
cpu/utilization: 15
cloud/instance-type: A1
cloud/region: uk-west
requests: 30
- timestamp: "2023-12-12T00:00:13.000Z"
duration: 30
cloud/instance-type: A1
cloud/region: uk-west
cpu/utilization: 15
requests: 50
child-2:
pipeline:
- interpolate
- cpu-factor-to-wattage
- wattage-times-duration
- wattage-to-energy-kwh
- calculate-vcpu-ratio
- correct-cpu-energy-for-vcpu-ratio
- sci-embodied
- operational-carbon
- sum-carbon
- time-sync
- sci
config:
group-by:
group:
- cloud/region
- cloud/instance-type
observe:
- mock-observations
regroup:
- cloud/region
- cloud/instance-type
compute:
- interpolate
- cpu-factor-to-wattage
- wattage-times-duration
- wattage-to-energy-kwh
- calculate-vcpu-ratio
- correct-cpu-energy-for-vcpu-ratio
- sci-embodied
- operational-carbon
- sum-carbon
- time-sync
- sci
defaults:
cpu/thermal-design-power: 100
grid/carbon-intensity: 800
Expand All @@ -181,27 +217,3 @@ tree:
vcpus-total: 8
vcpus-allocated: 1
inputs:
- timestamp: "2023-12-12T00:00:00.000Z"
duration: 1
cpu/utilization: 30
cloud/instance-type: A1
cloud/region: uk-west
requests: 30
- timestamp: "2023-12-12T00:00:01.000Z"
duration: 5
cpu/utilization: 28
cloud/instance-type: A1
cloud/region: uk-west
requests: 40
- timestamp: "2023-12-12T00:00:06.000Z"
duration: 7
cpu/utilization: 40
cloud/instance-type: A1
cloud/region: uk-west
requests: 50
- timestamp: "2023-12-12T00:00:13.000Z"
duration: 30
cpu/utilization: 33
cloud/instance-type: A1
cloud/region: uk-west
requests: 60
Loading

0 comments on commit e53e9fe

Please sign in to comment.