Skip to content

Commit

Permalink
fix(manifests): update plugins to use builtins
Browse files Browse the repository at this point in the history
  • Loading branch information
MariamKhalatova committed Jun 20, 2024
1 parent b80ab76 commit ae53a1c
Show file tree
Hide file tree
Showing 21 changed files with 212 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@ name: cloud-metadata
description: cloud/instance-type instance type is not supported in the cloud vendor
tags:
initialize:
outputs: ['yaml']
# outputs: ['yaml']
plugins:
cloud-metadata:
method: CloudMetadata
path: "@grnsft/if-plugins"
path: builtin
method: CSVLookup
global-config:
filepath: >-
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
query:
instance-class: cloud/instance-type
output: ['cpu-cores-utilized', 'vcpus-allocated']
tree:
children:
child:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ initialize:
#outputs: ['yaml']
plugins:
cloud-metadata:
method: CloudMetadata
path: "@grnsft/if-plugins"
path: builtin
method: CSVLookup
global-config:
filepath: >-
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
query:
instance-class: cloud/instance-type
output: ['cpu-cores-utilized', 'vcpus-allocated']
tree:
children:
child:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@ name: cloud-metadata
description: failing because cloud/vendor is not provided
tags:
initialize:
outputs: ['yaml']
# outputs: ['yaml']
plugins:
cloud-metadata:
method: CloudMetadata
path: "@grnsft/if-plugins"
path: builtin
method: CSVLookup
global-config:
filepath: >-
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
query:
instance-class: cloud/instance-type
output: ['cpu-cores-utilized', 'vcpus-allocated']
tree:
children:
child:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ initialize:
# outputs: ['yaml']
plugins:
cloud-metadata:
method: CloudMetadata
path: "@grnsft/if-plugins"
path: builtin
method: CSVLookup
global-config:
filepath: >-
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
query:
instance-class: cloud/instance-type
output: ['cpu-cores-utilized', 'vcpus-allocated']
tree:
children:
child:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: tdp-finder
description: failure with `inputs` missing `physical-processor` param
tags:
initialize:
# outputs: ['yaml']
plugins:
tdp-finder:
method: CSVLookup
path: "builtin"
global-config:
filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/tdp-data-1.csv
query:
name: physical-processor
output: "tdp"
tree:
children:
child:
pipeline:
- tdp-finder
config:
inputs:
- timestamp: 2023-07-06T00:00
duration: 300
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: tdp-finder
description: successful path
tags:
initialize:
# outputs: ['yaml']
plugins:
tdp-finder:
method: CSVLookup
path: "builtin"
global-config:
filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/tdp-data-1.csv
query:
name: physical-processor
output: "tdp"
tree:
children:
child:
pipeline:
- tdp-finder
config:
inputs:
- timestamp: 2023-07-06T00:00
duration: 300
physical-processor: AMD 302
24 changes: 24 additions & 0 deletions manifests/plugins/csv-lookup/tdp-finder/success.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: tdp-finder
description: successful path
tags:
initialize:
# outputs: ['yaml']
plugins:
tdp-finder:
method: CSVLookup
path: "builtin"
global-config:
filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/tdp-data-1.csv
query:
name: physical-processor
output: "tdp"
tree:
children:
child:
pipeline:
- tdp-finder
config:
inputs:
- timestamp: 2023-07-06T00:00
duration: 300
physical-processor: AMD 3020e
10 changes: 8 additions & 2 deletions manifests/plugins/divide/failure-denominator-equal-zero.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ initialize:
# outputs: ['yaml']
plugins:
cloud-metadata:
method: CloudMetadata
path: "@grnsft/if-plugins"
path: builtin
method: CSVLookup
global-config:
filepath: >-
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
query:
instance-class: cloud/instance-type
output: ['cpu-cores-utilized', 'vcpus-allocated']
divide:
method: Divide
path: "builtin"
Expand Down
10 changes: 8 additions & 2 deletions manifests/plugins/divide/failure-invalid-config-denominator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ initialize:
outputs: ['yaml']
plugins:
cloud-metadata:
method: CloudMetadata
path: "@grnsft/if-plugins"
path: builtin
method: CSVLookup
global-config:
filepath: >-
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
query:
instance-class: cloud/instance-type
output: ['cpu-cores-utilized', 'vcpus-allocated']
divide:
method: Divide
path: "builtin"
Expand Down
10 changes: 8 additions & 2 deletions manifests/plugins/divide/failure-missing-numerator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ initialize:
# outputs: ['yaml']
plugins:
cloud-metadata:
method: CloudMetadata
path: "@grnsft/if-plugins"
path: builtin
method: CSVLookup
global-config:
filepath: >-
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
query:
instance-class: cloud/instance-type
output: ['cpu-cores-utilized', 'vcpus-allocated']
divide:
method: Divide
path: "builtin"
Expand Down
10 changes: 8 additions & 2 deletions manifests/plugins/divide/success.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ initialize:
# outputs: ['yaml']
plugins:
cloud-metadata:
method: CloudMetadata
path: "@grnsft/if-plugins"
path: builtin
method: CSVLookup
global-config:
filepath: >-
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
query:
instance-class: cloud/instance-type
output: ['cpu-cores-utilized', 'vcpus-allocated']
divide:
method: Divide
path: "builtin"
Expand Down
26 changes: 26 additions & 0 deletions manifests/plugins/exponent/success.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: exponent demo
description:
tags:
initialize:
# outputs:
# - yaml
plugins:
exponent:
method: Exponent
path: 'builtin'
global-config:
input-parameter: 'cpu/energy'
exponent: 2
output-parameter: 'energy'
tree:
children:
child:
pipeline:
- exponent
config:
exponent:
inputs:
- timestamp: 2023-08-06T00:00
duration: 3600
cpu/energy: 0.001
network/energy: 0.001
24 changes: 24 additions & 0 deletions manifests/plugins/interpolation/success.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: interpolation-demo
description: simple demo of interpolation plugin
tags:
initialize:
plugins:
interpolation:
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: "result"

tree:
children:
child:
pipeline:
- interpolation
inputs:
- timestamp: 2023-07-06T00:00
duration: 3600
cpu/utilization: 45
25 changes: 25 additions & 0 deletions manifests/plugins/subtract/success.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: subtract demo
description:
tags:
initialize:
outputs:
- yaml
plugins:
subtract:
method: Subtract
path: 'builtin'
global-config:
input-parameters: ['cpu/energy', 'network/energy']
output-parameter: 'energy/diff'
tree:
children:
child:
pipeline:
- subtract
config:
subtract:
inputs:
- timestamp: 2023-08-06T00:00
duration: 3600
cpu/energy: 0.003
network/energy: 0.001
18 changes: 0 additions & 18 deletions manifests/plugins/tdp-finder/failure-missing-input-param.yml

This file was deleted.

This file was deleted.

19 changes: 0 additions & 19 deletions manifests/plugins/tdp-finder/success.yml

This file was deleted.

0 comments on commit ae53a1c

Please sign in to comment.