@grnsft/if 0.4.0-beta.1 → 0.5.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +7 -5
- package/README.md +20 -33
- package/Refactor-migration-guide.md +5 -6
- package/build/builtins/coefficient/index.d.ts +1 -2
- package/build/builtins/coefficient/index.js +18 -4
- package/build/builtins/copy-param/index.d.ts +2 -0
- package/build/builtins/copy-param/index.js +68 -0
- package/build/builtins/csv-lookup/index.d.ts +1 -1
- package/build/builtins/csv-lookup/index.js +44 -37
- package/build/builtins/divide/index.d.ts +1 -1
- package/build/builtins/divide/index.js +22 -11
- package/build/builtins/exponent/index.d.ts +1 -2
- package/build/builtins/exponent/index.js +9 -23
- package/build/builtins/export-csv-raw.d.ts +4 -2
- package/build/builtins/export-csv-raw.js +7 -7
- package/build/builtins/export-csv.js +8 -11
- package/build/builtins/export-log.js +1 -1
- package/build/builtins/export-yaml.js +6 -6
- package/build/builtins/group-by.d.ts +1 -1
- package/build/builtins/group-by.js +5 -5
- package/build/builtins/index.d.ts +1 -0
- package/build/builtins/index.js +4 -2
- package/build/builtins/interpolation/index.d.ts +1 -1
- package/build/builtins/interpolation/index.js +10 -8
- package/build/builtins/mock-observations/helpers/common-generator.d.ts +2 -2
- package/build/builtins/mock-observations/helpers/common-generator.js +10 -13
- package/build/builtins/mock-observations/helpers/rand-int-generator.d.ts +2 -2
- package/build/builtins/mock-observations/helpers/rand-int-generator.js +14 -24
- package/build/builtins/mock-observations/index.d.ts +1 -2
- package/build/builtins/mock-observations/index.js +2 -4
- package/build/builtins/multiply/index.d.ts +1 -2
- package/build/builtins/multiply/index.js +10 -16
- package/build/builtins/regex/index.d.ts +1 -2
- package/build/builtins/regex/index.js +8 -12
- package/build/builtins/sci/index.d.ts +1 -2
- package/build/builtins/sci/index.js +23 -22
- package/build/builtins/sci-embodied/index.d.ts +1 -1
- package/build/builtins/sci-embodied/index.js +16 -17
- package/build/builtins/shell/index.d.ts +1 -2
- package/build/builtins/shell/index.js +4 -4
- package/build/builtins/subtract/index.d.ts +1 -2
- package/build/builtins/subtract/index.js +7 -23
- package/build/builtins/sum/index.d.ts +1 -2
- package/build/builtins/sum/index.js +14 -11
- package/build/builtins/time-sync.d.ts +1 -2
- package/build/builtins/time-sync.js +62 -67
- package/build/check.d.ts +2 -0
- package/build/check.js +85 -0
- package/build/config/config.d.ts +13 -1
- package/build/config/config.js +61 -1
- package/build/config/params.js +1 -6
- package/build/config/strings.d.ts +41 -5
- package/build/config/strings.js +46 -9
- package/build/diff.js +7 -2
- package/build/env.d.ts +2 -0
- package/build/env.js +38 -0
- package/build/lib/aggregate.js +1 -1
- package/build/lib/compute.js +1 -1
- package/build/lib/exhaust.js +4 -4
- package/build/lib/initialize.js +20 -24
- package/build/lib/load.js +5 -7
- package/build/types/compute.d.ts +1 -1
- package/build/types/compute.js +1 -1
- package/build/types/if-env.d.ts +8 -0
- package/build/types/if-env.js +3 -0
- package/build/types/interface.d.ts +1 -19
- package/build/types/interface.js +1 -1
- package/build/types/npm.d.ts +9 -0
- package/build/types/npm.js +3 -0
- package/build/types/process-args.d.ts +9 -0
- package/build/types/process-args.js +1 -1
- package/build/types/util/args.d.ts +1 -0
- package/build/types/util/args.js +1 -1
- package/build/util/aggregation-helper.d.ts +1 -1
- package/build/util/aggregation-helper.js +5 -5
- package/build/util/args.d.ts +23 -1
- package/build/util/args.js +91 -14
- package/build/util/fs.d.ts +20 -0
- package/build/util/fs.js +94 -0
- package/build/util/helpers.d.ts +26 -6
- package/build/util/helpers.js +112 -17
- package/build/util/npm.d.ts +28 -0
- package/build/util/npm.js +152 -0
- package/build/util/plugin-storage.js +4 -4
- package/build/util/validations.js +4 -4
- package/github-processes.md +39 -0
- package/jest.config.js +1 -1
- package/manifests/bugs/aggregation-error-wrong-metric.yml +73 -23
- package/manifests/bugs/azure-importer-ignoring-defaults.yml +6 -3
- package/manifests/bugs/azure-importer-incorrect-calculation.yml +6 -3
- package/manifests/bugs/initialize-error-no-config.yml +4 -5
- package/manifests/bugs/initialize-error-no-path.yml +9 -5
- package/manifests/bugs/input-error-missing-duration.yml +10 -6
- package/manifests/bugs/pipeline-error-naming-mismatch.yml +8 -4
- package/manifests/bugs/pipeline-error-uninitialized-plugin.yml +9 -5
- package/manifests/bugs/pipeline-ordering-error.yml +43 -34
- package/manifests/examples/copy.yaml +20 -0
- package/manifests/examples/generics.yml +48 -13
- package/manifests/examples/instance-metadata.yml +4 -4
- package/manifests/examples/mock-cpu-util-to-carbon.yml +8 -2
- package/manifests/examples/nesting.yml +82 -35
- package/manifests/examples/pipeline-teads-sci.yml +54 -18
- package/manifests/examples/pipeline-with-aggregate.yml +66 -24
- package/manifests/examples/pipeline-with-mocks.yml +65 -22
- package/manifests/examples/region-metadata.yml +26 -0
- package/manifests/examples/tdp-finder.yml +23 -0
- package/manifests/examples/zeros.yaml +130 -0
- package/manifests/features/{aggregate-failure-inalid-metrics.yml → aggregate-failure-invalid-metrics.yml} +9 -3
- package/manifests/features/aggregate-failure-missing-metric-in-inputs.yml +9 -3
- package/manifests/features/aggregate-horizontal.yml +8 -2
- package/manifests/features/aggregate-vertical.yml +8 -2
- package/manifests/features/aggregate.yml +8 -2
- package/manifests/integrations/{cloud-metadata-divide-boavizta.yml → cloud-metadata-divide.yml} +8 -9
- package/manifests/integrations/instance-metadata/failure-invalid-instance-type.yaml +33 -0
- package/manifests/integrations/instance-metadata/failure-invalid-provider.yaml +33 -0
- package/manifests/integrations/instance-metadata/failure-missing-queried-input.yml +33 -0
- package/manifests/integrations/instance-metadata/success.yml +33 -0
- package/manifests/integrations/mock-obs-group-by-cloud-meta.yml +8 -2
- package/manifests/integrations/mock-obs-time-sync.yml +50 -5
- package/manifests/plugins/{cloud-metadata → csv-lookup/cloud-metadata}/failure-invalid-instance-type.yaml +9 -3
- package/manifests/plugins/{cloud-metadata → csv-lookup/cloud-metadata}/failure-invalid-vendor.yaml +8 -2
- package/manifests/plugins/{cloud-metadata → csv-lookup/cloud-metadata}/failure-missing-cloud-vendor.yml +9 -3
- package/manifests/plugins/{cloud-metadata → csv-lookup/cloud-metadata}/success.yml +8 -2
- package/manifests/plugins/csv-lookup/{success.yml → region-metadata/success.yml} +1 -1
- package/manifests/plugins/csv-lookup/tdp-finder/failure-missing-input-param.yml +23 -0
- package/manifests/plugins/csv-lookup/tdp-finder/failure-unsupported-physical-processor.yml +24 -0
- package/manifests/plugins/csv-lookup/tdp-finder/success.yml +24 -0
- package/manifests/plugins/divide/failure-denominator-equal-zero.yml +8 -9
- package/manifests/plugins/divide/failure-invalid-config-denominator.yml +8 -9
- package/manifests/plugins/divide/failure-missing-numerator.yml +8 -9
- package/manifests/plugins/divide/success.yml +9 -10
- package/manifests/plugins/exponent/success.yml +26 -0
- package/manifests/plugins/interpolation/success.yml +24 -0
- package/manifests/plugins/sci/failure-missing-input-param.yml +2 -6
- package/manifests/plugins/sci/success.yml +0 -3
- package/manifests/plugins/subtract/success.yml +25 -0
- package/manifests/plugins/sum/success.yml +1 -1
- package/package.json +10 -4
- package/src/__mocks__/mock-manifest.yaml +72 -0
- package/src/builtins/README.md +1 -1
- package/src/builtins/coefficient/README.md +19 -1
- package/src/builtins/copy-param/README.md +104 -0
- package/src/builtins/csv-lookup/README.md +39 -1
- package/src/builtins/divide/README.md +29 -3
- package/src/builtins/exponent/README.md +21 -1
- package/src/builtins/interpolation/README.md +29 -1
- package/src/builtins/mock-observations/README.md +1 -1
- package/src/builtins/multiply/README.md +16 -1
- package/src/builtins/regex/README.md +32 -2
- package/src/builtins/sci/README.md +24 -1
- package/src/builtins/sci-embodied/README.md +15 -1
- package/src/builtins/shell/README.md +12 -1
- package/src/builtins/subtract/README.md +12 -1
- package/src/builtins/sum/README.md +28 -1
- package/src/config/env-template.yml +24 -0
- package/build/builtins/coefficient/types.d.ts +0 -5
- package/build/builtins/coefficient/types.js +0 -3
- package/build/builtins/exponent/types.d.ts +0 -5
- package/build/builtins/exponent/types.js +0 -3
- package/build/builtins/interpolation/types.d.ts +0 -5
- package/build/builtins/interpolation/types.js +0 -10
- package/build/builtins/mock-observations/types.d.ts +0 -13
- package/build/builtins/mock-observations/types.js +0 -3
- package/build/builtins/multiply/types.d.ts +0 -4
- package/build/builtins/multiply/types.js +0 -3
- package/build/builtins/subtract/types.d.ts +0 -4
- package/build/builtins/subtract/types.js +0 -3
- package/build/builtins/sum/types.d.ts +0 -4
- package/build/builtins/sum/types.js +0 -3
- package/build/types/common.d.ts +0 -4
- package/build/types/common.js +0 -3
- package/build/types/group-by.d.ts +0 -3
- package/build/types/group-by.js +0 -3
- package/build/types/helpers.d.ts +0 -4
- package/build/types/helpers.js +0 -3
- package/build/util/errors.d.ts +0 -6
- package/build/util/errors.js +0 -33
- package/manifests/examples/basic.yml +0 -28
- package/manifests/plugins/tdp-finder/failure-missing-input-param.yml +0 -18
- package/manifests/plugins/tdp-finder/failure-unsupported-physical-processor.yml +0 -19
- package/manifests/plugins/tdp-finder/success.yml +0 -19
- /package/manifests/plugins/csv-lookup/{failure-missing-column.yml → region-metadata/failure-missing-column.yml} +0 -0
- /package/manifests/plugins/csv-lookup/{failure-missing-output.yml → region-metadata/failure-missing-output.yml} +0 -0
- /package/manifests/plugins/csv-lookup/{success-renaming.yml → region-metadata/success-renaming.yml} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: csv-demo
|
|
2
|
+
description:
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
tdp-finder:
|
|
7
|
+
method: CSVLookup
|
|
8
|
+
path: "builtin"
|
|
9
|
+
global-config:
|
|
10
|
+
filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/tdp-data-1.csv
|
|
11
|
+
query:
|
|
12
|
+
name: instance-id
|
|
13
|
+
output: "tdp"
|
|
14
|
+
tree:
|
|
15
|
+
children:
|
|
16
|
+
child:
|
|
17
|
+
pipeline:
|
|
18
|
+
- tdp-finder
|
|
19
|
+
inputs:
|
|
20
|
+
- timestamp: 2023-08-06T00:00
|
|
21
|
+
duration: 3600
|
|
22
|
+
cpu/energy: 0.001
|
|
23
|
+
instance-id: "AMD A10-9700"
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
name: generics
|
|
2
|
+
description: a pipeline that does arbitrary calculations using our generic arithmetic builtins
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
"sum-zero-and-one":
|
|
7
|
+
path: "builtin"
|
|
8
|
+
method: Sum
|
|
9
|
+
global-config:
|
|
10
|
+
input-parameters:
|
|
11
|
+
- some-value
|
|
12
|
+
- zero-value
|
|
13
|
+
output-parameter: one-plus-zero
|
|
14
|
+
"sum-zero-and-zero":
|
|
15
|
+
path: "builtin"
|
|
16
|
+
method: Sum
|
|
17
|
+
global-config:
|
|
18
|
+
input-parameters:
|
|
19
|
+
- zero-value
|
|
20
|
+
- zero-value
|
|
21
|
+
output-parameter: zero-plus-zero
|
|
22
|
+
"subtract-one-and-zero":
|
|
23
|
+
path: "builtin"
|
|
24
|
+
method: Subtract
|
|
25
|
+
global-config:
|
|
26
|
+
input-parameters:
|
|
27
|
+
- some-value
|
|
28
|
+
- zero-value
|
|
29
|
+
output-parameter: one-minus-zero
|
|
30
|
+
"subtract-zero-and-zero":
|
|
31
|
+
path: "builtin"
|
|
32
|
+
method: Sum
|
|
33
|
+
global-config:
|
|
34
|
+
input-parameters:
|
|
35
|
+
- zero-value
|
|
36
|
+
- zero-value
|
|
37
|
+
output-parameter: zero-minus-zero
|
|
38
|
+
"subtract-zero-and-one":
|
|
39
|
+
path: "builtin"
|
|
40
|
+
method: Subtract
|
|
41
|
+
global-config:
|
|
42
|
+
input-parameters:
|
|
43
|
+
- zero-value
|
|
44
|
+
- some-value
|
|
45
|
+
output-parameter: zero-minus-one
|
|
46
|
+
"coefficient-one-times-zero":
|
|
47
|
+
path: "builtin"
|
|
48
|
+
method: Coefficient
|
|
49
|
+
global-config:
|
|
50
|
+
input-parameter: zero-value
|
|
51
|
+
coefficient: 1
|
|
52
|
+
output-parameter: zero-times-one-coefficient
|
|
53
|
+
"coefficient-zero-times-one":
|
|
54
|
+
path: "builtin"
|
|
55
|
+
method: Coefficient
|
|
56
|
+
global-config:
|
|
57
|
+
input-parameter: some-value
|
|
58
|
+
coefficient: 0
|
|
59
|
+
output-parameter: one-times-zero-coefficient
|
|
60
|
+
"coefficient-zero-times-zero":
|
|
61
|
+
path: "builtin"
|
|
62
|
+
method: Coefficient
|
|
63
|
+
global-config:
|
|
64
|
+
input-parameter: zero-value
|
|
65
|
+
coefficient: 0
|
|
66
|
+
output-parameter: zero-times-zero-coefficient
|
|
67
|
+
"multiply-one-times-zero":
|
|
68
|
+
path: "builtin"
|
|
69
|
+
method: Multiply
|
|
70
|
+
global-config:
|
|
71
|
+
input-parameters: ["some-value", "zero-value"]
|
|
72
|
+
output-parameter: "one-times-zero"
|
|
73
|
+
"multiply-zero-times-one":
|
|
74
|
+
path: "builtin"
|
|
75
|
+
method: Multiply
|
|
76
|
+
global-config:
|
|
77
|
+
input-parameters: ["zero-value", "zero-value"]
|
|
78
|
+
output-parameter: "zero-times-one"
|
|
79
|
+
exponent-one-to-zero:
|
|
80
|
+
method: Exponent
|
|
81
|
+
path: 'builtin'
|
|
82
|
+
global-config:
|
|
83
|
+
input-parameter: 'some-value'
|
|
84
|
+
exponent: 0
|
|
85
|
+
output-parameter: 'one-raised-to-zero-power'
|
|
86
|
+
exponent-zero-to-zero:
|
|
87
|
+
method: Exponent
|
|
88
|
+
path: 'builtin'
|
|
89
|
+
global-config:
|
|
90
|
+
input-parameter: 'zero-value'
|
|
91
|
+
exponent: 0
|
|
92
|
+
output-parameter: 'zero-raised-to-zero-power'
|
|
93
|
+
exponent-zero-to-one:
|
|
94
|
+
method: Exponent
|
|
95
|
+
path: 'builtin'
|
|
96
|
+
global-config:
|
|
97
|
+
input-parameter: 'zero-value'
|
|
98
|
+
exponent: 1
|
|
99
|
+
output-parameter: 'zero-raised-to-first-power'
|
|
100
|
+
"sci":
|
|
101
|
+
path: "builtin"
|
|
102
|
+
method: Sci
|
|
103
|
+
global-config:
|
|
104
|
+
functional-unit: "zero-value"
|
|
105
|
+
tree:
|
|
106
|
+
children:
|
|
107
|
+
child-1:
|
|
108
|
+
pipeline:
|
|
109
|
+
- sum-zero-and-one
|
|
110
|
+
- sum-zero-and-zero
|
|
111
|
+
- subtract-one-and-zero
|
|
112
|
+
- subtract-zero-and-zero
|
|
113
|
+
- subtract-zero-and-one
|
|
114
|
+
- coefficient-one-times-zero
|
|
115
|
+
- coefficient-zero-times-one
|
|
116
|
+
- coefficient-zero-times-zero
|
|
117
|
+
- multiply-one-times-zero
|
|
118
|
+
- multiply-zero-times-one
|
|
119
|
+
- exponent-one-to-zero
|
|
120
|
+
- exponent-zero-to-one
|
|
121
|
+
- exponent-zero-to-zero
|
|
122
|
+
- sci
|
|
123
|
+
config:
|
|
124
|
+
defaults:
|
|
125
|
+
inputs:
|
|
126
|
+
- timestamp: "2023-12-12T00:00:00.000Z"
|
|
127
|
+
duration: 1
|
|
128
|
+
some-value: 1
|
|
129
|
+
zero-value: 0
|
|
130
|
+
carbon: 10
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: Aggregation
|
|
2
|
-
description:
|
|
2
|
+
description: Fails with invalid metric.
|
|
3
3
|
aggregation:
|
|
4
4
|
metrics:
|
|
5
5
|
- 'test'
|
|
@@ -7,8 +7,14 @@ aggregation:
|
|
|
7
7
|
initialize:
|
|
8
8
|
plugins:
|
|
9
9
|
cloud-metadata:
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
path: builtin
|
|
11
|
+
method: CSVLookup
|
|
12
|
+
global-config:
|
|
13
|
+
filepath: >-
|
|
14
|
+
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
|
|
15
|
+
query:
|
|
16
|
+
instance-class: cloud/instance-type
|
|
17
|
+
output: ['cpu-cores-utilized', 'vcpus-allocated']
|
|
12
18
|
tree:
|
|
13
19
|
children:
|
|
14
20
|
application:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: Aggregation
|
|
2
|
-
description:
|
|
2
|
+
description: Fails with missing metric in inputs.
|
|
3
3
|
aggregation:
|
|
4
4
|
metrics:
|
|
5
5
|
- 'cpu/utilization'
|
|
@@ -7,8 +7,14 @@ aggregation:
|
|
|
7
7
|
initialize:
|
|
8
8
|
plugins:
|
|
9
9
|
cloud-metadata:
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
path: builtin
|
|
11
|
+
method: CSVLookup
|
|
12
|
+
global-config:
|
|
13
|
+
filepath: >-
|
|
14
|
+
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
|
|
15
|
+
query:
|
|
16
|
+
instance-class: cloud/instance-type
|
|
17
|
+
output: ['cpu-cores-utilized', 'vcpus-allocated']
|
|
12
18
|
tree:
|
|
13
19
|
children:
|
|
14
20
|
application:
|
|
@@ -7,8 +7,14 @@ aggregation:
|
|
|
7
7
|
initialize:
|
|
8
8
|
plugins:
|
|
9
9
|
cloud-metadata:
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
path: builtin
|
|
11
|
+
method: CSVLookup
|
|
12
|
+
global-config:
|
|
13
|
+
filepath: >-
|
|
14
|
+
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
|
|
15
|
+
query:
|
|
16
|
+
instance-class: cloud/instance-type
|
|
17
|
+
output: ['cpu-cores-utilized', 'vcpus-allocated']
|
|
12
18
|
tree:
|
|
13
19
|
children:
|
|
14
20
|
application:
|
|
@@ -7,8 +7,14 @@ aggregation:
|
|
|
7
7
|
initialize:
|
|
8
8
|
plugins:
|
|
9
9
|
cloud-metadata:
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
path: builtin
|
|
11
|
+
method: CSVLookup
|
|
12
|
+
global-config:
|
|
13
|
+
filepath: >-
|
|
14
|
+
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
|
|
15
|
+
query:
|
|
16
|
+
instance-class: cloud/instance-type
|
|
17
|
+
output: ['cpu-cores-utilized', 'vcpus-allocated']
|
|
12
18
|
tree:
|
|
13
19
|
children:
|
|
14
20
|
application:
|
|
@@ -7,8 +7,14 @@ aggregation:
|
|
|
7
7
|
initialize:
|
|
8
8
|
plugins:
|
|
9
9
|
cloud-metadata:
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
path: builtin
|
|
11
|
+
method: CSVLookup
|
|
12
|
+
global-config:
|
|
13
|
+
filepath: >-
|
|
14
|
+
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
|
|
15
|
+
query:
|
|
16
|
+
instance-class: cloud/instance-type
|
|
17
|
+
output: ['cpu-cores-utilized', 'vcpus-allocated']
|
|
12
18
|
tree:
|
|
13
19
|
children:
|
|
14
20
|
application:
|
package/manifests/integrations/{cloud-metadata-divide-boavizta.yml → cloud-metadata-divide.yml}
RENAMED
|
@@ -4,8 +4,14 @@ tags:
|
|
|
4
4
|
initialize:
|
|
5
5
|
plugins:
|
|
6
6
|
cloud-metadata:
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
path: builtin
|
|
8
|
+
method: CSVLookup
|
|
9
|
+
global-config:
|
|
10
|
+
filepath: >-
|
|
11
|
+
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
|
|
12
|
+
query:
|
|
13
|
+
instance-class: cloud/instance-type
|
|
14
|
+
output: ['cpu-cores-utilized', 'vcpus-allocated']
|
|
9
15
|
divide:
|
|
10
16
|
method: Divide
|
|
11
17
|
path: "builtin"
|
|
@@ -13,19 +19,12 @@ initialize:
|
|
|
13
19
|
numerator: vcpus-allocated
|
|
14
20
|
denominator: 2
|
|
15
21
|
output: cpu/number-cores
|
|
16
|
-
boavizta-cpu:
|
|
17
|
-
method: BoaviztaCpuOutput
|
|
18
|
-
path: "@grnsft/if-unofficial-plugins"
|
|
19
|
-
global-config:
|
|
20
|
-
allocation: LINEAR
|
|
21
|
-
verbose: true
|
|
22
22
|
tree:
|
|
23
23
|
children:
|
|
24
24
|
child:
|
|
25
25
|
pipeline:
|
|
26
26
|
- cloud-metadata
|
|
27
27
|
- divide
|
|
28
|
-
- boavizta-cpu
|
|
29
28
|
config:
|
|
30
29
|
divide:
|
|
31
30
|
defaults:
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: instance-metadata
|
|
2
|
+
description:
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
cloud-instance-metadata:
|
|
7
|
+
method: CSVLookup
|
|
8
|
+
path: "builtin"
|
|
9
|
+
global-config:
|
|
10
|
+
filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-azure-instances.csv
|
|
11
|
+
query:
|
|
12
|
+
instance-class: "cloud/instance-type"
|
|
13
|
+
output: "*"
|
|
14
|
+
extract-processor-name:
|
|
15
|
+
method: Regex
|
|
16
|
+
path: "builtin"
|
|
17
|
+
global-config:
|
|
18
|
+
parameter: cpu-model-name
|
|
19
|
+
match: /^([^,])+/g
|
|
20
|
+
output: cpu/name
|
|
21
|
+
tree:
|
|
22
|
+
children:
|
|
23
|
+
child:
|
|
24
|
+
pipeline:
|
|
25
|
+
- cloud-instance-metadata
|
|
26
|
+
- extract-processor-name
|
|
27
|
+
inputs:
|
|
28
|
+
- timestamp: 2023-08-06T00:00
|
|
29
|
+
duration: 3600
|
|
30
|
+
cpu/energy: 0.001
|
|
31
|
+
cloud/provider: gcp
|
|
32
|
+
cloud/region: asia-east
|
|
33
|
+
cloud/instance-type: m6
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: instance-metadata
|
|
2
|
+
description:
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
cloud-instance-metadata:
|
|
7
|
+
method: CSVLookup
|
|
8
|
+
path: "builtin"
|
|
9
|
+
global-config:
|
|
10
|
+
filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-azure-instances.csv
|
|
11
|
+
query:
|
|
12
|
+
instance-class: "cloud/provider"
|
|
13
|
+
output: "*"
|
|
14
|
+
extract-processor-name:
|
|
15
|
+
method: Regex
|
|
16
|
+
path: "builtin"
|
|
17
|
+
global-config:
|
|
18
|
+
parameter: cpu-model-name
|
|
19
|
+
match: /^([^,])+/g
|
|
20
|
+
output: cpu/name
|
|
21
|
+
tree:
|
|
22
|
+
children:
|
|
23
|
+
child:
|
|
24
|
+
pipeline:
|
|
25
|
+
- cloud-instance-metadata
|
|
26
|
+
- extract-processor-name
|
|
27
|
+
inputs:
|
|
28
|
+
- timestamp: 2023-08-06T00:00
|
|
29
|
+
duration: 3600
|
|
30
|
+
cpu/energy: 0.001
|
|
31
|
+
cloud/provider: 6568
|
|
32
|
+
cloud/region: asia-east
|
|
33
|
+
cloud/instance-type: Standard_A1_v2
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: instance-metadata
|
|
2
|
+
description:
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
cloud-instance-metadata:
|
|
7
|
+
method: CSVLookup
|
|
8
|
+
path: "builtin"
|
|
9
|
+
global-config:
|
|
10
|
+
filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-azure-instances.csv
|
|
11
|
+
query:
|
|
12
|
+
instance-class: "cloud/provider"
|
|
13
|
+
output: "*"
|
|
14
|
+
extract-processor-name:
|
|
15
|
+
method: Regex
|
|
16
|
+
path: "builtin"
|
|
17
|
+
global-config:
|
|
18
|
+
parameter: cpu-model-name
|
|
19
|
+
match: /^([^,])+/g
|
|
20
|
+
output: cpu/name
|
|
21
|
+
tree:
|
|
22
|
+
children:
|
|
23
|
+
child:
|
|
24
|
+
pipeline:
|
|
25
|
+
- cloud-instance-metadata
|
|
26
|
+
- extract-processor-name
|
|
27
|
+
inputs:
|
|
28
|
+
- timestamp: 2023-08-06T00:00
|
|
29
|
+
duration: 3600
|
|
30
|
+
cpu/energy: 0.001
|
|
31
|
+
# cloud/provider: gcp
|
|
32
|
+
cloud/region: asia-east
|
|
33
|
+
cloud/instance-type: Standard_A1_v2
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: instance-metadata
|
|
2
|
+
description:
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
cloud-instance-metadata:
|
|
7
|
+
method: CSVLookup
|
|
8
|
+
path: "builtin"
|
|
9
|
+
global-config:
|
|
10
|
+
filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-azure-instances.csv
|
|
11
|
+
query:
|
|
12
|
+
instance-class: "cloud/instance-type"
|
|
13
|
+
output: "*"
|
|
14
|
+
extract-processor-name:
|
|
15
|
+
method: Regex
|
|
16
|
+
path: "builtin"
|
|
17
|
+
global-config:
|
|
18
|
+
parameter: cpu-model-name
|
|
19
|
+
match: /^([^,])+/g
|
|
20
|
+
output: cpu/name
|
|
21
|
+
tree:
|
|
22
|
+
children:
|
|
23
|
+
child:
|
|
24
|
+
pipeline:
|
|
25
|
+
- cloud-instance-metadata
|
|
26
|
+
- extract-processor-name
|
|
27
|
+
inputs:
|
|
28
|
+
- timestamp: 2023-08-06T00:00
|
|
29
|
+
duration: 3600
|
|
30
|
+
cpu/energy: 0.001
|
|
31
|
+
cloud/provider: gcp
|
|
32
|
+
cloud/region: asia-east
|
|
33
|
+
cloud/instance-type: Standard_A1_v2
|
|
@@ -14,8 +14,14 @@ initialize:
|
|
|
14
14
|
input-parameters: ['cpu/energy', 'grid/carbon-intensity']
|
|
15
15
|
output-parameter: 'carbon'
|
|
16
16
|
cloud-metadata:
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
path: builtin
|
|
18
|
+
method: CSVLookup
|
|
19
|
+
global-config:
|
|
20
|
+
filepath: >-
|
|
21
|
+
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-azure-instances.csv
|
|
22
|
+
query:
|
|
23
|
+
instance-class: cloud/instance-type
|
|
24
|
+
output: ['cpu-tdp']
|
|
19
25
|
mock-observations:
|
|
20
26
|
path: 'builtin'
|
|
21
27
|
method: MockObservations
|
|
@@ -21,11 +21,48 @@ initialize:
|
|
|
21
21
|
cpu/utilization:
|
|
22
22
|
min: 1
|
|
23
23
|
max: 99
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
"interpolate":
|
|
25
|
+
method: Interpolation
|
|
26
|
+
path: 'builtin'
|
|
27
27
|
global-config:
|
|
28
|
-
|
|
28
|
+
method: linear
|
|
29
|
+
x: [0, 10, 50, 100]
|
|
30
|
+
y: [0.12, 0.32, 0.75, 1.02]
|
|
31
|
+
input-parameter: 'cpu/utilization'
|
|
32
|
+
output-parameter: 'cpu-factor'
|
|
33
|
+
"cpu-factor-to-wattage":
|
|
34
|
+
method: Multiply
|
|
35
|
+
path: builtin
|
|
36
|
+
global-config:
|
|
37
|
+
input-parameters: ["cpu-factor", "cpu/thermal-design-power"]
|
|
38
|
+
output-parameter: "cpu-wattage"
|
|
39
|
+
"wattage-times-duration":
|
|
40
|
+
method: Multiply
|
|
41
|
+
path: builtin
|
|
42
|
+
global-config:
|
|
43
|
+
input-parameters: ["cpu-wattage", "duration"]
|
|
44
|
+
output-parameter: "cpu-wattage-times-duration"
|
|
45
|
+
"wattage-to-energy-kwh":
|
|
46
|
+
method: Divide
|
|
47
|
+
path: "builtin"
|
|
48
|
+
global-config:
|
|
49
|
+
numerator: cpu-wattage-times-duration
|
|
50
|
+
denominator: 3600000
|
|
51
|
+
output: cpu-energy-raw
|
|
52
|
+
"calculate-vcpu-ratio":
|
|
53
|
+
method: Divide
|
|
54
|
+
path: "builtin"
|
|
55
|
+
global-config:
|
|
56
|
+
numerator: vcpus-total
|
|
57
|
+
denominator: vcpus-allocated
|
|
58
|
+
output: vcpu-ratio
|
|
59
|
+
"correct-cpu-energy-for-vcpu-ratio":
|
|
60
|
+
method: Divide
|
|
61
|
+
path: "builtin"
|
|
62
|
+
global-config:
|
|
63
|
+
numerator: cpu-energy-raw
|
|
64
|
+
denominator: vcpu-ratio
|
|
65
|
+
output: cpu-energy-kwh
|
|
29
66
|
"time-sync":
|
|
30
67
|
method: TimeSync
|
|
31
68
|
path: "builtin"
|
|
@@ -38,10 +75,18 @@ tree:
|
|
|
38
75
|
children:
|
|
39
76
|
child-1:
|
|
40
77
|
pipeline:
|
|
41
|
-
-
|
|
78
|
+
# - mock-observations
|
|
79
|
+
- interpolate
|
|
80
|
+
- cpu-factor-to-wattage
|
|
81
|
+
- wattage-times-duration
|
|
82
|
+
- wattage-to-energy-kwh
|
|
83
|
+
- calculate-vcpu-ratio
|
|
84
|
+
- correct-cpu-energy-for-vcpu-ratio
|
|
42
85
|
- time-sync
|
|
43
86
|
defaults:
|
|
44
87
|
cpu/thermal-design-power: 100
|
|
88
|
+
vcpus-total: 8
|
|
89
|
+
vcpus-allocated: 1
|
|
45
90
|
inputs:
|
|
46
91
|
- timestamp: "2023-12-12T00:00:00.000Z"
|
|
47
92
|
cloud/instance-type: A1
|
|
@@ -2,11 +2,17 @@ name: cloud-metadata
|
|
|
2
2
|
description: cloud/instance-type instance type is not supported in the cloud vendor
|
|
3
3
|
tags:
|
|
4
4
|
initialize:
|
|
5
|
-
outputs: ['yaml']
|
|
5
|
+
# outputs: ['yaml']
|
|
6
6
|
plugins:
|
|
7
7
|
cloud-metadata:
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
path: builtin
|
|
9
|
+
method: CSVLookup
|
|
10
|
+
global-config:
|
|
11
|
+
filepath: >-
|
|
12
|
+
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
|
|
13
|
+
query:
|
|
14
|
+
instance-class: cloud/instance-type
|
|
15
|
+
output: ['cpu-cores-utilized', 'vcpus-allocated']
|
|
10
16
|
tree:
|
|
11
17
|
children:
|
|
12
18
|
child:
|
package/manifests/plugins/{cloud-metadata → csv-lookup/cloud-metadata}/failure-invalid-vendor.yaml
RENAMED
|
@@ -5,8 +5,14 @@ initialize:
|
|
|
5
5
|
#outputs: ['yaml']
|
|
6
6
|
plugins:
|
|
7
7
|
cloud-metadata:
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
path: builtin
|
|
9
|
+
method: CSVLookup
|
|
10
|
+
global-config:
|
|
11
|
+
filepath: >-
|
|
12
|
+
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
|
|
13
|
+
query:
|
|
14
|
+
instance-class: cloud/instance-type
|
|
15
|
+
output: ['cpu-cores-utilized', 'vcpus-allocated']
|
|
10
16
|
tree:
|
|
11
17
|
children:
|
|
12
18
|
child:
|
|
@@ -2,11 +2,17 @@ name: cloud-metadata
|
|
|
2
2
|
description: failing because cloud/vendor is not provided
|
|
3
3
|
tags:
|
|
4
4
|
initialize:
|
|
5
|
-
outputs: ['yaml']
|
|
5
|
+
# outputs: ['yaml']
|
|
6
6
|
plugins:
|
|
7
7
|
cloud-metadata:
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
path: builtin
|
|
9
|
+
method: CSVLookup
|
|
10
|
+
global-config:
|
|
11
|
+
filepath: >-
|
|
12
|
+
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
|
|
13
|
+
query:
|
|
14
|
+
instance-class: cloud/instance-type
|
|
15
|
+
output: ['cpu-cores-utilized', 'vcpus-allocated']
|
|
10
16
|
tree:
|
|
11
17
|
children:
|
|
12
18
|
child:
|
|
@@ -5,8 +5,14 @@ initialize:
|
|
|
5
5
|
# outputs: ['yaml']
|
|
6
6
|
plugins:
|
|
7
7
|
cloud-metadata:
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
path: builtin
|
|
9
|
+
method: CSVLookup
|
|
10
|
+
global-config:
|
|
11
|
+
filepath: >-
|
|
12
|
+
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-aws-instances.csv
|
|
13
|
+
query:
|
|
14
|
+
instance-class: cloud/instance-type
|
|
15
|
+
output: ['cpu-cores-utilized', 'vcpus-allocated']
|
|
10
16
|
tree:
|
|
11
17
|
children:
|
|
12
18
|
child:
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: tdp-finder
|
|
2
|
+
description: failure with `inputs` missing `physical-processor` param
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
# outputs: ['yaml']
|
|
6
|
+
plugins:
|
|
7
|
+
tdp-finder:
|
|
8
|
+
method: CSVLookup
|
|
9
|
+
path: "builtin"
|
|
10
|
+
global-config:
|
|
11
|
+
filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/tdp-data-1.csv
|
|
12
|
+
query:
|
|
13
|
+
name: physical-processor
|
|
14
|
+
output: "tdp"
|
|
15
|
+
tree:
|
|
16
|
+
children:
|
|
17
|
+
child:
|
|
18
|
+
pipeline:
|
|
19
|
+
- tdp-finder
|
|
20
|
+
config:
|
|
21
|
+
inputs:
|
|
22
|
+
- timestamp: 2023-07-06T00:00
|
|
23
|
+
duration: 300
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: tdp-finder
|
|
2
|
+
description: successful path
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
# outputs: ['yaml']
|
|
6
|
+
plugins:
|
|
7
|
+
tdp-finder:
|
|
8
|
+
method: CSVLookup
|
|
9
|
+
path: "builtin"
|
|
10
|
+
global-config:
|
|
11
|
+
filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/tdp-data-1.csv
|
|
12
|
+
query:
|
|
13
|
+
name: physical-processor
|
|
14
|
+
output: "tdp"
|
|
15
|
+
tree:
|
|
16
|
+
children:
|
|
17
|
+
child:
|
|
18
|
+
pipeline:
|
|
19
|
+
- tdp-finder
|
|
20
|
+
config:
|
|
21
|
+
inputs:
|
|
22
|
+
- timestamp: 2023-07-06T00:00
|
|
23
|
+
duration: 300
|
|
24
|
+
physical-processor: AMD 302
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: tdp-finder
|
|
2
|
+
description: successful path
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
# outputs: ['yaml']
|
|
6
|
+
plugins:
|
|
7
|
+
tdp-finder:
|
|
8
|
+
method: CSVLookup
|
|
9
|
+
path: "builtin"
|
|
10
|
+
global-config:
|
|
11
|
+
filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/tdp-data-1.csv
|
|
12
|
+
query:
|
|
13
|
+
name: physical-processor
|
|
14
|
+
output: "tdp"
|
|
15
|
+
tree:
|
|
16
|
+
children:
|
|
17
|
+
child:
|
|
18
|
+
pipeline:
|
|
19
|
+
- tdp-finder
|
|
20
|
+
config:
|
|
21
|
+
inputs:
|
|
22
|
+
- timestamp: 2023-07-06T00:00
|
|
23
|
+
duration: 300
|
|
24
|
+
physical-processor: AMD 3020e
|