Skip to content

Commit

Permalink
feat(manifests): init scenarios for phased execution
Browse files Browse the repository at this point in the history
  • Loading branch information
narekhovhannisyan committed Jul 17, 2024
1 parent 3a00c90 commit 7bb370b
Show file tree
Hide file tree
Showing 5 changed files with 265 additions and 0 deletions.
35 changes: 35 additions & 0 deletions manifests/examples/pipelines/scenario-1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: demo
description: demo for observe feat
tags:
initialize:
plugins:
mock-observations:
kind: plugin
method: MockObservations
path: "builtin"
global-config:
timestamp-from: 2023-07-06T00:00
timestamp-to: 2023-07-06T00:01
duration: 60
components:
- cloud/instance-type: A1
- cloud/instance-type: B1
generators:
common:
region: uk-west
common-key: common-val
randint:
cpu/utilization:
min: 1
max: 99
memory/utilization:
min: 1
max: 99
tree:
children:
child:
pipeline:
observe:
- mock-observations
inputs: null

52 changes: 52 additions & 0 deletions manifests/examples/pipelines/scenario-2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: regroup demo
description:
initialize:
plugins:
interpolate:
method: Interpolation
path: "builtin"
global-config:
method: linear
x: [0, 10, 50, 100]
y: [0.12, 0.32, 0.75, 1.02]
input-parameter: "cpu/utilization"
output-parameter: "cpu-factor"
tree:
children:
child:
pipeline:
observe:
regroup:
- cloud/region
- cloud/instance-type
inputs:
- timestamp: 2023-07-06T00:00
duration: 300
cloud/instance-type: A1
cloud/region: uk-west
cpu/utilization: 99
- timestamp: 2023-07-06T05:00
duration: 300
cloud/instance-type: A1
cloud/region: uk-west
cpu/utilization: 23
- timestamp: 2023-07-06T10:00
duration: 300
cloud/instance-type: A1
cloud/region: uk-west
cpu/utilization: 12
- timestamp: 2023-07-06T00:00 # note this time restarts at the start timstamp
duration: 300
cloud/instance-type: B1
cloud/region: uk-west
cpu/utilization: 11
- timestamp: 2023-07-06T05:00
duration: 300
cloud/instance-type: B1
cloud/region: uk-west
cpu/utilization: 67
- timestamp: 2023-07-06T10:00
duration: 300
cloud/instance-type: B1
cloud/region: uk-west
cpu/utilization: 1
86 changes: 86 additions & 0 deletions manifests/examples/pipelines/scenario-3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: groupby
description: successful path
initialize:
plugins:
"sum":
path: "builtin"
method: Sum
global-config:
input-parameters:
- cpu/energy
- network/energy
output-parameter: energy
tree:
children:
my-app:
pipeline:
observe:
regroup:
- cloud/instance-type
- cloud/region
compute:
children:
uk-west:
inputs:
- timestamp: 2023-07-06T00:00
duration: 300
cloud/instance-type: A1
cloud/region: uk-west
cpu/utilization: 99
- timestamp: 2023-07-06T05:00
duration: 300
cloud/instance-type: A1
cloud/region: uk-west
cpu/utilization: 23
- timestamp: 2023-07-06T10:00
duration: 300
cloud/instance-type: A1
cloud/region: uk-west
cpu/utilization: 12
- timestamp: 2023-07-06T00:00
duration: 300
cloud/instance-type: B1
cloud/region: uk-west
cpu/utilization: 11
- timestamp: 2023-07-06T05:00
duration: 300
cloud/instance-type: B1
cloud/region: uk-west
cpu/utilization: 67
- timestamp: 2023-07-06T10:00
duration: 300
cloud/instance-type: B1
cloud/region: uk-west
cpu/utilization: 1
uk-east:
inputs:
- timestamp: 2023-07-06T00:00
duration: 300
cloud/instance-type: A1
cloud/region: uk-east
cpu/utilization: 9
- timestamp: 2023-07-06T05:00
duration: 300
cloud/instance-type: A1
cloud/region: uk-east
cpu/utilization: 23
- timestamp: 2023-07-06T10:00
duration: 300
cloud/instance-type: A1
cloud/region: uk-east
cpu/utilization: 12
- timestamp: 2023-07-06T00:00
duration: 300
cloud/instance-type: B1
cloud/region: uk-east
cpu/utilization: 11
- timestamp: 2023-07-06T05:00
duration: 300
cloud/instance-type: B1
cloud/region: uk-east
cpu/utilization: 67
- timestamp: 2023-07-06T10:00
duration: 300
cloud/instance-type: B1
cloud/region: uk-east
cpu/utilization: 1
46 changes: 46 additions & 0 deletions manifests/examples/pipelines/scenario-4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: demo
description:
tags:
initialize:
plugins:
"sum":
path: "builtin"
method: Sum
global-config:
input-parameters:
- cpu/energy
- network/energy
output-parameter: energy-sum
"coefficient":
path: "builtin"
method: Coefficient
global-config:
input-parameter: energy
coefficient: 2
output-parameter: energy-doubled
"multiply":
path: "builtin"
method: Multiply
global-config:
input-parameters: ["cpu/utilization", "duration"]
output-parameter: "cpu-times-duration"
tree:
children:
child-1:
pipeline:
observe:
compute:
- sum
- coefficient
- multiply
defaults:
cpu/thermal-design-power: 100
inputs:
- timestamp: "2023-12-12T00:00:00.000Z"
cloud/instance-type: A1
cloud/region: uk-west
duration: 1
cpu/utilization: 50
cpu/energy: 20
network/energy: 10
energy: 5
46 changes: 46 additions & 0 deletions manifests/examples/pipelines/scenario-5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: demo
description:
tags:
initialize:
plugins:
mock-observations:
kind: plugin
method: MockObservations
path: "builtin"
global-config:
timestamp-from: 2023-07-06T00:00
timestamp-to: 2023-07-06T00:01
duration: 60
components:
- cloud/instance-type: A1
- cloud/instance-type: B1
generators:
common:
region: uk-west
common-key: common-val
randint:
cpu/utilization:
min: 1
max: 99
memory/utilization:
min: 1
max: 99
sum:
path: "builtin"
method: Sum
global-config:
input-parameters:
- cpu/utilization
- memory/utilization
output-parameter: util-sum
tree:
children:
child:
pipeline:
observe:
- mock-observations
regroup:
- cloud/instance-type
compute:
- sum
inputs: null

0 comments on commit 7bb370b

Please sign in to comment.