@grnsft/if 0.3.3-beta.0 → 0.4.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/.commitlintrc.js +0 -1
- package/.env +5 -0
- package/.lintstagedrc.js +6 -0
- package/README.md +12 -8
- package/Refactor-migration-guide.md +6 -6
- package/coverage/clover.xml +1590 -0
- package/coverage/coverage-final.json +50 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/builtins/coefficient/index.html +116 -0
- package/coverage/lcov-report/builtins/coefficient/index.ts.html +295 -0
- package/coverage/lcov-report/builtins/csv-lookup/index.html +116 -0
- package/coverage/lcov-report/builtins/csv-lookup/index.ts.html +832 -0
- package/coverage/lcov-report/builtins/divide/index.html +116 -0
- package/coverage/lcov-report/builtins/divide/index.ts.html +361 -0
- package/coverage/lcov-report/builtins/exponent/index.html +116 -0
- package/coverage/lcov-report/builtins/exponent/index.ts.html +355 -0
- package/coverage/lcov-report/builtins/export-csv-raw.ts.html +553 -0
- package/coverage/lcov-report/builtins/export-csv.ts.html +433 -0
- package/coverage/lcov-report/builtins/export-log.ts.html +145 -0
- package/coverage/lcov-report/builtins/export-yaml.ts.html +184 -0
- package/coverage/lcov-report/builtins/group-by.ts.html +364 -0
- package/coverage/lcov-report/builtins/index.html +206 -0
- package/coverage/lcov-report/builtins/index.ts.html +130 -0
- package/coverage/lcov-report/builtins/interpolation/index.html +131 -0
- package/coverage/lcov-report/builtins/interpolation/index.ts.html +670 -0
- package/coverage/lcov-report/builtins/interpolation/types.ts.html +100 -0
- package/coverage/lcov-report/builtins/mock-observations/helpers/common-generator.ts.html +181 -0
- package/coverage/lcov-report/builtins/mock-observations/helpers/index.html +131 -0
- package/coverage/lcov-report/builtins/mock-observations/helpers/rand-int-generator.ts.html +295 -0
- package/coverage/lcov-report/builtins/mock-observations/index.html +116 -0
- package/coverage/lcov-report/builtins/mock-observations/index.ts.html +613 -0
- package/coverage/lcov-report/builtins/multiply/index.html +116 -0
- package/coverage/lcov-report/builtins/multiply/index.ts.html +337 -0
- package/coverage/lcov-report/builtins/regex/index.html +116 -0
- package/coverage/lcov-report/builtins/regex/index.ts.html +379 -0
- package/coverage/lcov-report/builtins/sci/config.ts.html +205 -0
- package/coverage/lcov-report/builtins/sci/index.html +116 -0
- package/coverage/lcov-report/builtins/sci/index.ts.html +331 -0
- package/coverage/lcov-report/builtins/sci-embodied/index.html +116 -0
- package/coverage/lcov-report/builtins/sci-embodied/index.ts.html +481 -0
- package/coverage/lcov-report/builtins/shell/index.html +116 -0
- package/coverage/lcov-report/builtins/shell/index.ts.html +283 -0
- package/coverage/lcov-report/builtins/subtract/index.html +116 -0
- package/coverage/lcov-report/builtins/subtract/index.ts.html +373 -0
- package/coverage/lcov-report/builtins/sum/index.html +116 -0
- package/coverage/lcov-report/builtins/sum/index.ts.html +340 -0
- package/coverage/lcov-report/builtins/time-sync.ts.html +1459 -0
- package/coverage/lcov-report/config/config.ts.html +334 -0
- package/coverage/lcov-report/config/index.html +161 -0
- package/coverage/lcov-report/config/index.ts.html +94 -0
- package/coverage/lcov-report/config/params.ts.html +697 -0
- package/coverage/lcov-report/config/strings.ts.html +415 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +386 -0
- package/coverage/lcov-report/lib/aggregate.ts.html +331 -0
- package/coverage/lcov-report/lib/compare.ts.html +283 -0
- package/coverage/lcov-report/lib/compute.ts.html +391 -0
- package/coverage/lcov-report/lib/environment.ts.html +343 -0
- package/coverage/lcov-report/lib/exhaust.ts.html +283 -0
- package/coverage/lcov-report/lib/index.html +221 -0
- package/coverage/lcov-report/lib/initialize.ts.html +388 -0
- package/coverage/lcov-report/lib/load.ts.html +268 -0
- package/coverage/lcov-report/lib/parameterize.ts.html +283 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/types/aggregation.ts.html +94 -0
- package/coverage/lcov-report/types/index.html +146 -0
- package/coverage/lcov-report/types/interface.ts.html +181 -0
- package/coverage/lcov-report/types/parameters.ts.html +106 -0
- package/coverage/lcov-report/util/aggregation-helper.ts.html +286 -0
- package/coverage/lcov-report/util/args.ts.html +508 -0
- package/coverage/lcov-report/util/errors.ts.html +232 -0
- package/coverage/lcov-report/util/helpers.ts.html +613 -0
- package/coverage/lcov-report/util/index.html +266 -0
- package/coverage/lcov-report/util/json.ts.html +115 -0
- package/coverage/lcov-report/util/log-memoize.ts.html +145 -0
- package/coverage/lcov-report/util/logger.ts.html +151 -0
- package/coverage/lcov-report/util/os-checker.ts.html +421 -0
- package/coverage/lcov-report/util/plugin-storage.ts.html +199 -0
- package/coverage/lcov-report/util/validations.ts.html +526 -0
- package/coverage/lcov-report/util/yaml.ts.html +193 -0
- package/coverage/lcov.info +2811 -0
- package/github-processes.md +16 -42
- package/manifests/bugs/aggregation-error-wrong-metric.yml +6 -6
- package/manifests/bugs/azure-importer-ignoring-defaults.yml +3 -3
- package/manifests/bugs/azure-importer-incorrect-calculation.yml +2 -2
- package/manifests/bugs/mock-observations-failure-duration-is-zero.yml +34 -0
- package/manifests/bugs/pipeline-error-uninitialized-plugin.yml +1 -1
- package/manifests/bugs/pipeline-ordering-error.yml +6 -6
- package/manifests/bugs/sci-embodied-missing-resources-total.yml +23 -0
- package/manifests/examples/generics.yml +3 -3
- package/manifests/examples/instance-metadata.yml +36 -0
- package/manifests/examples/mock-cpu-util-to-carbon.yml +3 -3
- package/manifests/examples/nesting.yml +37 -10
- package/manifests/examples/pipeline-teads-sci.yml +17 -9
- package/manifests/examples/pipeline-with-aggregate.yml +24 -9
- package/manifests/examples/pipeline-with-mocks.yml +26 -9
- package/manifests/examples/sci.yml +131 -0
- package/manifests/examples/teads-curve.yml +78 -0
- package/manifests/features/aggregate-failure-inalid-metrics.yml +43 -0
- package/manifests/features/aggregate-failure-missing-metric-in-inputs.yml +43 -0
- package/manifests/integrations/cloud-metadata-divide-boavizta.yml +1 -1
- package/manifests/integrations/mock-obs-group-by-cloud-meta.yml +51 -0
- package/manifests/integrations/mock-obs-groupby.yml +2 -2
- package/manifests/integrations/mock-obs-time-sync.yml +1 -1
- package/manifests/plugins/cloud-metadata/failure-invalid-instance-type.yaml +21 -0
- package/manifests/plugins/cloud-metadata/failure-invalid-vendor.yaml +1 -1
- package/manifests/plugins/cloud-metadata/failure-missing-cloud-vendor.yml +21 -0
- package/manifests/plugins/cloud-metadata/success.yml +1 -1
- package/manifests/plugins/coefficient/failure-invalid-config-input-param.yml +1 -1
- package/manifests/plugins/coefficient/failure-output-param-is-null.yaml +24 -0
- package/manifests/plugins/coefficient/success.yml +1 -1
- package/manifests/plugins/csv-lookup/failure-missing-column.yml +26 -0
- package/manifests/plugins/csv-lookup/failure-missing-output.yml +26 -0
- package/manifests/plugins/csv-lookup/success-renaming.yml +26 -0
- package/manifests/plugins/csv-lookup/success.yml +26 -0
- package/manifests/plugins/divide/failure-denominator-equal-zero.yml +39 -0
- package/manifests/plugins/divide/failure-invalid-config-denominator.yml +1 -1
- package/manifests/plugins/divide/failure-missing-numerator.yml +39 -0
- package/manifests/plugins/divide/success.yml +2 -2
- package/manifests/plugins/groupby/failure-missing-cloud-instance-type.yml +49 -0
- package/manifests/plugins/interpolation/interpolation.yml +24 -0
- package/manifests/plugins/mock-observations/failure-invalid-config-cpu-range.yml +1 -1
- package/manifests/plugins/mock-observations/failure-invalid-memory-utilization-range.yml +34 -0
- package/manifests/plugins/mock-observations/failure-missing-timestamp-from-param.yml +34 -0
- package/manifests/plugins/mock-observations/success.yml +2 -2
- package/manifests/plugins/multiply/failure-input-parameter-is-missing.yml +1 -1
- package/manifests/plugins/multiply/success-with-multiple-inputs.yml +32 -0
- package/manifests/plugins/multiply/success.yml +3 -3
- package/manifests/plugins/regex/failure-missing-input-param.yml +1 -1
- package/manifests/plugins/regex/failure-not-matching-with-regex.yml +24 -0
- package/manifests/plugins/regex/success.yml +2 -2
- package/manifests/plugins/sci/failure-invalid-config-value.yml +2 -3
- package/manifests/plugins/sci/failure-missing-input-param.yml +27 -0
- package/manifests/plugins/sci/success.yml +5 -4
- package/manifests/plugins/{sci-m → sci-embodied}/failure-invalid-default-emission-value.yml +5 -6
- package/manifests/plugins/sci-embodied/failure-missing-expected-lifespan.yml +23 -0
- package/manifests/plugins/{sci-m → sci-embodied}/success.yml +5 -6
- package/manifests/plugins/shell/failure-invalid-command.yml +1 -1
- package/manifests/plugins/shell/success.yml +1 -2
- package/manifests/plugins/sum/failure-missing-input-param.yml +1 -1
- package/manifests/plugins/sum/failure-missing-output-param.yml +28 -0
- package/manifests/plugins/sum/success.yml +1 -1
- package/manifests/plugins/tdp-finder/failure-unsupported-physical-processor.yml +19 -0
- package/manifests/plugins/time-sync/failure-missing-global-config.yml +34 -0
- package/package.json +10 -2
- package/src/__tests__/integration/manifest/sci-e.yaml +23 -0
- package/src/builtins/README.md +5 -5
- package/src/builtins/coefficient/README.md +92 -0
- package/src/builtins/csv-lookup/README.md +142 -0
- package/src/builtins/divide/README.md +95 -0
- package/src/builtins/exponent/README.md +97 -0
- package/src/builtins/interpolation/README.md +168 -0
- package/src/builtins/mock-observations/README.md +97 -0
- package/src/builtins/multiply/README.md +94 -0
- package/src/builtins/regex/README.md +91 -0
- package/src/builtins/sci/README.md +89 -0
- package/src/builtins/sci-embodied/README.md +110 -0
- package/src/builtins/shell/README.md +130 -0
- package/src/builtins/subtract/README.md +94 -0
- package/src/builtins/sum/README.md +91 -0
|
@@ -15,18 +15,25 @@ initialize:
|
|
|
15
15
|
"sci-e":
|
|
16
16
|
path: "@grnsft/if-plugins"
|
|
17
17
|
method: SciE
|
|
18
|
-
"sci-
|
|
19
|
-
path: "
|
|
20
|
-
method:
|
|
18
|
+
"sci-embodied":
|
|
19
|
+
path: "builtin"
|
|
20
|
+
method: SciEmbodied
|
|
21
21
|
"sci-o":
|
|
22
22
|
path: "@grnsft/if-plugins"
|
|
23
23
|
method: SciO
|
|
24
24
|
"sci":
|
|
25
|
-
path: "
|
|
25
|
+
path: "builtin"
|
|
26
26
|
method: Sci
|
|
27
27
|
global-config:
|
|
28
28
|
functional-unit: "requests"
|
|
29
|
-
|
|
29
|
+
"sum-carbon":
|
|
30
|
+
path: "builtin"
|
|
31
|
+
method: Sum
|
|
32
|
+
global-config:
|
|
33
|
+
input-parameters:
|
|
34
|
+
- carbon-operational
|
|
35
|
+
- carbon-embodied
|
|
36
|
+
output-parameter: carbon
|
|
30
37
|
"time-sync":
|
|
31
38
|
method: TimeSync
|
|
32
39
|
path: "builtin"
|
|
@@ -44,8 +51,9 @@ tree:
|
|
|
44
51
|
pipeline:
|
|
45
52
|
- teads-curve
|
|
46
53
|
- sci-e
|
|
47
|
-
- sci-
|
|
54
|
+
- sci-embodied
|
|
48
55
|
- sci-o
|
|
56
|
+
- sum-carbon
|
|
49
57
|
- time-sync
|
|
50
58
|
- sci
|
|
51
59
|
config:
|
|
@@ -61,34 +69,38 @@ tree:
|
|
|
61
69
|
device/expected-lifespan: 94608000 # 3 years in seconds
|
|
62
70
|
resources-reserved: 1
|
|
63
71
|
resources-total: 8
|
|
64
|
-
functional-unit-time: "1 min"
|
|
65
72
|
inputs:
|
|
66
73
|
- timestamp: "2023-12-12T00:00:00.000Z"
|
|
67
74
|
cloud/instance-type: A1
|
|
68
75
|
cloud/region: uk-west
|
|
69
76
|
duration: 1
|
|
70
77
|
cpu/utilization: 10
|
|
78
|
+
requests: 10
|
|
71
79
|
- timestamp: "2023-12-12T00:00:01.000Z"
|
|
72
80
|
duration: 5
|
|
73
81
|
cpu/utilization: 20
|
|
74
82
|
cloud/instance-type: A1
|
|
75
83
|
cloud/region: uk-west
|
|
84
|
+
requests: 5
|
|
76
85
|
- timestamp: "2023-12-12T00:00:06.000Z"
|
|
77
86
|
duration: 7
|
|
78
87
|
cpu/utilization: 15
|
|
79
88
|
cloud/instance-type: A1
|
|
80
89
|
cloud/region: uk-west
|
|
90
|
+
requests: 15
|
|
81
91
|
- timestamp: "2023-12-12T00:00:13.000Z"
|
|
82
92
|
duration: 30
|
|
83
93
|
cloud/instance-type: A1
|
|
84
94
|
cloud/region: uk-west
|
|
85
95
|
cpu/utilization: 15
|
|
96
|
+
requests: 30
|
|
86
97
|
child-2:
|
|
87
98
|
pipeline:
|
|
88
99
|
- teads-curve
|
|
89
100
|
- sci-e
|
|
90
|
-
- sci-
|
|
101
|
+
- sci-embodied
|
|
91
102
|
- sci-o
|
|
103
|
+
- sum-carbon
|
|
92
104
|
- time-sync
|
|
93
105
|
- sci
|
|
94
106
|
config:
|
|
@@ -104,25 +116,28 @@ tree:
|
|
|
104
116
|
device/expected-lifespan: 94608000 # 3 years in seconds
|
|
105
117
|
resources-reserved: 1
|
|
106
118
|
resources-total: 8
|
|
107
|
-
functional-unit-time: "1 min"
|
|
108
119
|
inputs:
|
|
109
120
|
- timestamp: "2023-12-12T00:00:00.000Z"
|
|
110
121
|
duration: 1
|
|
111
122
|
cpu/utilization: 30
|
|
112
123
|
cloud/instance-type: A1
|
|
113
124
|
cloud/region: uk-west
|
|
125
|
+
requests: 100
|
|
114
126
|
- timestamp: "2023-12-12T00:00:01.000Z"
|
|
115
127
|
duration: 5
|
|
116
128
|
cpu/utilization: 28
|
|
117
129
|
cloud/instance-type: A1
|
|
118
130
|
cloud/region: uk-west
|
|
131
|
+
requests: 150
|
|
119
132
|
- timestamp: "2023-12-12T00:00:06.000Z"
|
|
120
133
|
duration: 7
|
|
121
134
|
cpu/utilization: 40
|
|
122
135
|
cloud/instance-type: A1
|
|
123
136
|
cloud/region: uk-west
|
|
137
|
+
requests: 110
|
|
124
138
|
- timestamp: "2023-12-12T00:00:13.000Z"
|
|
125
139
|
duration: 30
|
|
126
140
|
cpu/utilization: 33
|
|
127
141
|
cloud/instance-type: A1
|
|
128
142
|
cloud/region: uk-west
|
|
143
|
+
requests: 180
|
|
@@ -10,7 +10,7 @@ initialize:
|
|
|
10
10
|
mock-observations:
|
|
11
11
|
kind: plugin
|
|
12
12
|
method: MockObservations
|
|
13
|
-
path: "
|
|
13
|
+
path: "builtin"
|
|
14
14
|
global-config:
|
|
15
15
|
timestamp-from: 2023-07-06T00:00
|
|
16
16
|
timestamp-to: 2023-07-06T00:10
|
|
@@ -33,18 +33,25 @@ initialize:
|
|
|
33
33
|
"sci-e":
|
|
34
34
|
path: "@grnsft/if-plugins"
|
|
35
35
|
method: SciE
|
|
36
|
-
"sci-
|
|
37
|
-
path: "
|
|
38
|
-
method:
|
|
36
|
+
"sci-embodied":
|
|
37
|
+
path: "builtin"
|
|
38
|
+
method: SciEmbodied
|
|
39
39
|
"sci-o":
|
|
40
40
|
path: "@grnsft/if-plugins"
|
|
41
41
|
method: SciO
|
|
42
|
+
"sum-carbon":
|
|
43
|
+
path: "builtin"
|
|
44
|
+
method: Sum
|
|
45
|
+
global-config:
|
|
46
|
+
input-parameters:
|
|
47
|
+
- carbon-operational
|
|
48
|
+
- carbon-embodied
|
|
49
|
+
output-parameter: carbon
|
|
42
50
|
"sci":
|
|
43
|
-
path: "
|
|
51
|
+
path: "builtin"
|
|
44
52
|
method: Sci
|
|
45
53
|
global-config:
|
|
46
54
|
functional-unit: "requests"
|
|
47
|
-
functional-unit-time: "1 minute"
|
|
48
55
|
"time-sync":
|
|
49
56
|
method: TimeSync
|
|
50
57
|
path: "builtin"
|
|
@@ -56,15 +63,16 @@ initialize:
|
|
|
56
63
|
"group-by":
|
|
57
64
|
path: builtin
|
|
58
65
|
method: GroupBy
|
|
59
|
-
outputs: ['yaml']
|
|
66
|
+
# outputs: ['yaml']
|
|
60
67
|
tree:
|
|
61
68
|
children:
|
|
62
69
|
child-1:
|
|
63
70
|
pipeline:
|
|
64
71
|
- teads-curve
|
|
65
72
|
- sci-e
|
|
66
|
-
- sci-
|
|
73
|
+
- sci-embodied
|
|
67
74
|
- sci-o
|
|
75
|
+
- sum-carbon
|
|
68
76
|
- time-sync
|
|
69
77
|
- sci
|
|
70
78
|
config:
|
|
@@ -87,27 +95,32 @@ tree:
|
|
|
87
95
|
cloud/region: uk-west
|
|
88
96
|
duration: 1
|
|
89
97
|
cpu/utilization: 10
|
|
98
|
+
requests: 30
|
|
90
99
|
- timestamp: "2023-12-12T00:00:01.000Z"
|
|
91
100
|
duration: 5
|
|
92
101
|
cpu/utilization: 20
|
|
93
102
|
cloud/instance-type: A1
|
|
94
103
|
cloud/region: uk-west
|
|
104
|
+
requests: 40
|
|
95
105
|
- timestamp: "2023-12-12T00:00:06.000Z"
|
|
96
106
|
duration: 7
|
|
97
107
|
cpu/utilization: 15
|
|
98
108
|
cloud/instance-type: A1
|
|
99
109
|
cloud/region: uk-west
|
|
110
|
+
requests: 30
|
|
100
111
|
- timestamp: "2023-12-12T00:00:13.000Z"
|
|
101
112
|
duration: 30
|
|
102
113
|
cloud/instance-type: A1
|
|
103
114
|
cloud/region: uk-west
|
|
104
115
|
cpu/utilization: 15
|
|
116
|
+
requests: 50
|
|
105
117
|
child-2:
|
|
106
118
|
pipeline:
|
|
107
119
|
- teads-curve
|
|
108
120
|
- sci-e
|
|
109
|
-
- sci-
|
|
121
|
+
- sci-embodied
|
|
110
122
|
- sci-o
|
|
123
|
+
- sum-carbon
|
|
111
124
|
- time-sync
|
|
112
125
|
- sci
|
|
113
126
|
config:
|
|
@@ -130,18 +143,22 @@ tree:
|
|
|
130
143
|
cpu/utilization: 30
|
|
131
144
|
cloud/instance-type: A1
|
|
132
145
|
cloud/region: uk-west
|
|
146
|
+
requests: 30
|
|
133
147
|
- timestamp: "2023-12-12T00:00:01.000Z"
|
|
134
148
|
duration: 5
|
|
135
149
|
cpu/utilization: 28
|
|
136
150
|
cloud/instance-type: A1
|
|
137
151
|
cloud/region: uk-west
|
|
152
|
+
requests: 40
|
|
138
153
|
- timestamp: "2023-12-12T00:00:06.000Z"
|
|
139
154
|
duration: 7
|
|
140
155
|
cpu/utilization: 40
|
|
141
156
|
cloud/instance-type: A1
|
|
142
157
|
cloud/region: uk-west
|
|
158
|
+
requests: 50
|
|
143
159
|
- timestamp: "2023-12-12T00:00:13.000Z"
|
|
144
160
|
duration: 30
|
|
145
161
|
cpu/utilization: 33
|
|
146
162
|
cloud/instance-type: A1
|
|
147
163
|
cloud/region: uk-west
|
|
164
|
+
requests: 60
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
name: pipeline-teads-sci
|
|
2
|
+
description: a full pipeline seeded with some hardcoded input data and yielding an SCI score
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
interpolate:
|
|
7
|
+
method: Interpolation
|
|
8
|
+
path: 'builtin'
|
|
9
|
+
global-config:
|
|
10
|
+
method: linear
|
|
11
|
+
x: [0, 10, 50, 100]
|
|
12
|
+
y: [0.12, 0.32, 0.75, 1.02]
|
|
13
|
+
input-parameter: 'cpu/utilization'
|
|
14
|
+
output-parameter: 'cpu-factor'
|
|
15
|
+
cpu-factor-to-wattage:
|
|
16
|
+
method: Multiply
|
|
17
|
+
path: builtin
|
|
18
|
+
global-config:
|
|
19
|
+
input-parameters: ["cpu-factor", "cpu/thermal-design-power"]
|
|
20
|
+
output-parameter: "cpu-wattage"
|
|
21
|
+
wattage-times-duration:
|
|
22
|
+
method: Multiply
|
|
23
|
+
path: builtin
|
|
24
|
+
global-config:
|
|
25
|
+
input-parameters: ["cpu-wattage", "duration"]
|
|
26
|
+
output-parameter: "cpu-wattage-times-duration"
|
|
27
|
+
wattage-to-energy-kwh:
|
|
28
|
+
method: Divide
|
|
29
|
+
path: "builtin"
|
|
30
|
+
global-config:
|
|
31
|
+
numerator: cpu-wattage-times-duration
|
|
32
|
+
denominator: 3600000
|
|
33
|
+
output: cpu-energy-raw
|
|
34
|
+
calculate-vcpu-ratio:
|
|
35
|
+
method: Divide
|
|
36
|
+
path: "builtin"
|
|
37
|
+
global-config:
|
|
38
|
+
numerator: vcpus-total
|
|
39
|
+
denominator: vcpus-allocated
|
|
40
|
+
output: vcpu-ratio
|
|
41
|
+
correct-cpu-energy-for-vcpu-ratio:
|
|
42
|
+
method: Divide
|
|
43
|
+
path: "builtin"
|
|
44
|
+
global-config:
|
|
45
|
+
numerator: cpu-energy-raw
|
|
46
|
+
denominator: vcpu-ratio
|
|
47
|
+
output: cpu/energy
|
|
48
|
+
sum-energy-components:
|
|
49
|
+
path: "builtin"
|
|
50
|
+
method: Sum
|
|
51
|
+
global-config:
|
|
52
|
+
input-parameters:
|
|
53
|
+
- cpu/energy
|
|
54
|
+
- network/energy
|
|
55
|
+
output-parameter: energy
|
|
56
|
+
"embodied-carbon":
|
|
57
|
+
path: "builtin"
|
|
58
|
+
method: SciEmbodied
|
|
59
|
+
"operational-carbon":
|
|
60
|
+
method: Multiply
|
|
61
|
+
path: builtin
|
|
62
|
+
global-config:
|
|
63
|
+
input-parameters: ["energy", "grid/carbon-intensity"]
|
|
64
|
+
output-parameter: "carbon-operational"
|
|
65
|
+
"sum-carbon":
|
|
66
|
+
path: "builtin"
|
|
67
|
+
method: Sum
|
|
68
|
+
global-config:
|
|
69
|
+
input-parameters:
|
|
70
|
+
- carbon-operational
|
|
71
|
+
- carbon-embodied
|
|
72
|
+
output-parameter: carbon
|
|
73
|
+
"sci":
|
|
74
|
+
path: "builtin"
|
|
75
|
+
method: Sci
|
|
76
|
+
global-config:
|
|
77
|
+
functional-unit: "component"
|
|
78
|
+
outputs:
|
|
79
|
+
- yaml
|
|
80
|
+
tree:
|
|
81
|
+
children:
|
|
82
|
+
child-1:
|
|
83
|
+
pipeline:
|
|
84
|
+
- interpolate
|
|
85
|
+
- cpu-factor-to-wattage
|
|
86
|
+
- wattage-times-duration
|
|
87
|
+
- wattage-to-energy-kwh
|
|
88
|
+
- calculate-vcpu-ratio
|
|
89
|
+
- correct-cpu-energy-for-vcpu-ratio
|
|
90
|
+
- sum-energy-components
|
|
91
|
+
- embodied-carbon
|
|
92
|
+
- operational-carbon
|
|
93
|
+
- sum-carbon
|
|
94
|
+
- sci
|
|
95
|
+
config:
|
|
96
|
+
defaults:
|
|
97
|
+
cpu/thermal-design-power: 100
|
|
98
|
+
vcpus-total: 8
|
|
99
|
+
vcpus-allocated: 2
|
|
100
|
+
grid/carbon-intensity: 800
|
|
101
|
+
device/emissions-embodied: 1533.120 # gCO2eq
|
|
102
|
+
time-reserved: 3600 # 1hr in seconds
|
|
103
|
+
device/expected-lifespan: 94608000 # 3 years in seconds
|
|
104
|
+
resources-reserved: vcpus-allocated
|
|
105
|
+
resources-total: vcpus-total
|
|
106
|
+
component: 1
|
|
107
|
+
inputs:
|
|
108
|
+
- timestamp: "2023-12-12T00:00:00.000Z"
|
|
109
|
+
cloud/instance-type: A1
|
|
110
|
+
cloud/region: uk-west
|
|
111
|
+
duration: 1
|
|
112
|
+
cpu/utilization: 50
|
|
113
|
+
network/energy: 0.000001
|
|
114
|
+
- timestamp: "2023-12-12T00:00:01.000Z"
|
|
115
|
+
duration: 5
|
|
116
|
+
cpu/utilization: 20
|
|
117
|
+
cloud/instance-type: A1
|
|
118
|
+
cloud/region: uk-west
|
|
119
|
+
network/energy: 0.000001
|
|
120
|
+
- timestamp: "2023-12-12T00:00:06.000Z"
|
|
121
|
+
duration: 7
|
|
122
|
+
cpu/utilization: 15
|
|
123
|
+
cloud/instance-type: A1
|
|
124
|
+
cloud/region: uk-west
|
|
125
|
+
network/energy: 0.000001
|
|
126
|
+
- timestamp: "2023-12-12T00:00:13.000Z"
|
|
127
|
+
duration: 30
|
|
128
|
+
cloud/instance-type: A1
|
|
129
|
+
cloud/region: uk-west
|
|
130
|
+
cpu/utilization: 15
|
|
131
|
+
network/energy: 0.000001
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: carbon-intensity plugin demo
|
|
2
|
+
description:
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
interpolate:
|
|
7
|
+
method: Interpolation
|
|
8
|
+
path: 'builtin'
|
|
9
|
+
global-config:
|
|
10
|
+
method: linear
|
|
11
|
+
x: [0, 10, 50, 100]
|
|
12
|
+
y: [0.12, 0.32, 0.75, 1.02]
|
|
13
|
+
input-parameter: 'cpu/utilization'
|
|
14
|
+
output-parameter: 'cpu-factor'
|
|
15
|
+
cpu-factor-to-wattage:
|
|
16
|
+
method: Multiply
|
|
17
|
+
path: builtin
|
|
18
|
+
global-config:
|
|
19
|
+
input-parameters: ["cpu-factor", "thermal-design-power"]
|
|
20
|
+
output-parameter: "cpu-wattage"
|
|
21
|
+
wattage-times-duration:
|
|
22
|
+
method: Multiply
|
|
23
|
+
path: builtin
|
|
24
|
+
global-config:
|
|
25
|
+
input-parameters: ["cpu-wattage", "duration"]
|
|
26
|
+
output-parameter: "cpu-wattage-times-duration"
|
|
27
|
+
wattage-to-energy-kwh:
|
|
28
|
+
method: Divide
|
|
29
|
+
path: "builtin"
|
|
30
|
+
global-config:
|
|
31
|
+
numerator: cpu-wattage-times-duration
|
|
32
|
+
denominator: 3600000
|
|
33
|
+
output: cpu-energy-raw
|
|
34
|
+
calculate-vcpu-ratio:
|
|
35
|
+
method: Divide
|
|
36
|
+
path: "builtin"
|
|
37
|
+
global-config:
|
|
38
|
+
numerator: vcpus-total
|
|
39
|
+
denominator: vcpus-allocated
|
|
40
|
+
output: vcpu-ratio
|
|
41
|
+
correct-cpu-energy-for-vcpu-ratio:
|
|
42
|
+
method: Divide
|
|
43
|
+
path: "builtin"
|
|
44
|
+
global-config:
|
|
45
|
+
numerator: cpu-energy-raw
|
|
46
|
+
denominator: vcpu-ratio
|
|
47
|
+
output: cpu-energy-kwh
|
|
48
|
+
tree:
|
|
49
|
+
children:
|
|
50
|
+
child:
|
|
51
|
+
pipeline:
|
|
52
|
+
- interpolate
|
|
53
|
+
- cpu-factor-to-wattage
|
|
54
|
+
- wattage-times-duration
|
|
55
|
+
- wattage-to-energy-kwh
|
|
56
|
+
- calculate-vcpu-ratio
|
|
57
|
+
- correct-cpu-energy-for-vcpu-ratio
|
|
58
|
+
defaults:
|
|
59
|
+
thermal-design-power: 100
|
|
60
|
+
vcpus-total: 8
|
|
61
|
+
vcpus-allocated: 2
|
|
62
|
+
inputs:
|
|
63
|
+
- timestamp: 2023-08-06T00:00
|
|
64
|
+
duration: 360
|
|
65
|
+
cpu/utilization: 1
|
|
66
|
+
carbon: 30
|
|
67
|
+
- timestamp: 2023-09-06T00:00
|
|
68
|
+
duration: 360
|
|
69
|
+
carbon: 30
|
|
70
|
+
cpu/utilization: 10
|
|
71
|
+
- timestamp: 2023-10-06T00:00
|
|
72
|
+
duration: 360
|
|
73
|
+
carbon: 30
|
|
74
|
+
cpu/utilization: 50
|
|
75
|
+
- timestamp: 2023-10-06T00:00
|
|
76
|
+
duration: 360
|
|
77
|
+
carbon: 30
|
|
78
|
+
cpu/utilization: 100
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Aggregation
|
|
2
|
+
description: Apply both `horizontal` and `vertical` aggregations
|
|
3
|
+
aggregation:
|
|
4
|
+
metrics:
|
|
5
|
+
- 'test'
|
|
6
|
+
type: 'both'
|
|
7
|
+
initialize:
|
|
8
|
+
plugins:
|
|
9
|
+
cloud-metadata:
|
|
10
|
+
method: CloudMetadata
|
|
11
|
+
path: "@grnsft/if-plugins"
|
|
12
|
+
tree:
|
|
13
|
+
children:
|
|
14
|
+
application:
|
|
15
|
+
pipeline:
|
|
16
|
+
- cloud-metadata
|
|
17
|
+
children:
|
|
18
|
+
uk-west:
|
|
19
|
+
children:
|
|
20
|
+
server-1:
|
|
21
|
+
inputs:
|
|
22
|
+
- timestamp: '2024-02-26 00:00:00'
|
|
23
|
+
duration: 300
|
|
24
|
+
cloud/instance-type: m5n.large
|
|
25
|
+
cloud/vendor: aws
|
|
26
|
+
cpu/utilization: 89
|
|
27
|
+
- timestamp: '2024-02-26 00:05:00'
|
|
28
|
+
duration: 300
|
|
29
|
+
cloud/instance-type: m5n.large
|
|
30
|
+
cloud/vendor: aws
|
|
31
|
+
cpu/utilization: 59
|
|
32
|
+
server-2:
|
|
33
|
+
inputs:
|
|
34
|
+
- timestamp: '2024-02-26 00:00:00'
|
|
35
|
+
duration: 300
|
|
36
|
+
cloud/instance-type: m5n.large
|
|
37
|
+
cloud/vendor: aws
|
|
38
|
+
cpu/utilization: 24
|
|
39
|
+
- timestamp: '2024-02-26 00:05:00'
|
|
40
|
+
duration: 300
|
|
41
|
+
cloud/instance-type: m5n.large
|
|
42
|
+
cloud/vendor: aws
|
|
43
|
+
cpu/utilization: 27
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Aggregation
|
|
2
|
+
description: Apply both `horizontal` and `vertical` aggregations
|
|
3
|
+
aggregation:
|
|
4
|
+
metrics:
|
|
5
|
+
- 'cpu/utilization'
|
|
6
|
+
type: 'both'
|
|
7
|
+
initialize:
|
|
8
|
+
plugins:
|
|
9
|
+
cloud-metadata:
|
|
10
|
+
method: CloudMetadata
|
|
11
|
+
path: "@grnsft/if-plugins"
|
|
12
|
+
tree:
|
|
13
|
+
children:
|
|
14
|
+
application:
|
|
15
|
+
pipeline:
|
|
16
|
+
- cloud-metadata
|
|
17
|
+
children:
|
|
18
|
+
uk-west:
|
|
19
|
+
children:
|
|
20
|
+
server-1:
|
|
21
|
+
inputs:
|
|
22
|
+
- timestamp: '2024-01-26 00:00:00'
|
|
23
|
+
duration: 300
|
|
24
|
+
cloud/instance-type: m5n.large
|
|
25
|
+
cloud/vendor: aws
|
|
26
|
+
cpu/utilization: 89
|
|
27
|
+
- timestamp: '2024-02-26 00:05:00'
|
|
28
|
+
duration: 300
|
|
29
|
+
cloud/instance-type: m5n.large
|
|
30
|
+
cloud/vendor: aws
|
|
31
|
+
cpu/utilization: 59
|
|
32
|
+
server-2:
|
|
33
|
+
inputs:
|
|
34
|
+
- timestamp: '2024-02-26 00:00:00'
|
|
35
|
+
duration: 300
|
|
36
|
+
cloud/instance-type: m5n.large
|
|
37
|
+
cloud/vendor: aws
|
|
38
|
+
# cpu/utilization: 110
|
|
39
|
+
- timestamp: '2024-02-26 00:15:00'
|
|
40
|
+
duration: 300
|
|
41
|
+
cloud/instance-type: m5n.large
|
|
42
|
+
cloud/vendor: aws
|
|
43
|
+
cpu/utilization: 27
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: My Manifest File
|
|
2
|
+
description: integration of mock observations, group by and cloud metadata
|
|
3
|
+
aggregation:
|
|
4
|
+
metrics:
|
|
5
|
+
- 'cpu/utilization'
|
|
6
|
+
type: 'both'
|
|
7
|
+
initialize:
|
|
8
|
+
# outputs: ['yaml']
|
|
9
|
+
plugins:
|
|
10
|
+
group-by:
|
|
11
|
+
path: 'builtin'
|
|
12
|
+
method: GroupBy
|
|
13
|
+
global-config:
|
|
14
|
+
input-parameters: ['cpu/energy', 'grid/carbon-intensity']
|
|
15
|
+
output-parameter: 'carbon'
|
|
16
|
+
cloud-metadata:
|
|
17
|
+
method: CloudMetadata
|
|
18
|
+
path: "@grnsft/if-plugins"
|
|
19
|
+
mock-observations:
|
|
20
|
+
path: 'builtin'
|
|
21
|
+
method: MockObservations
|
|
22
|
+
global-config:
|
|
23
|
+
timestamp-from: 2024-03-05T00:00
|
|
24
|
+
timestamp-to: 2024-03-05T01:00
|
|
25
|
+
duration: 300
|
|
26
|
+
components:
|
|
27
|
+
- name: server-1
|
|
28
|
+
cloud/instance-type: Standard_E64_v3
|
|
29
|
+
cloud/region: eastus
|
|
30
|
+
- name: server-2
|
|
31
|
+
cloud/instance-type: Standard_E64_v3
|
|
32
|
+
cloud/region: france
|
|
33
|
+
generators:
|
|
34
|
+
common:
|
|
35
|
+
geolocation: 37.7749,-122.4194
|
|
36
|
+
cloud/vendor: azure
|
|
37
|
+
randint:
|
|
38
|
+
cpu/utilization:
|
|
39
|
+
min: 1
|
|
40
|
+
max: 99
|
|
41
|
+
tree:
|
|
42
|
+
pipeline:
|
|
43
|
+
- mock-observations
|
|
44
|
+
- group-by
|
|
45
|
+
- cloud-metadata
|
|
46
|
+
config:
|
|
47
|
+
group-by:
|
|
48
|
+
group:
|
|
49
|
+
- name
|
|
50
|
+
- cloud/instance-type
|
|
51
|
+
inputs: null
|
|
@@ -3,7 +3,7 @@ description: Integration of `mock observations` + `groupby plugins`
|
|
|
3
3
|
initialize:
|
|
4
4
|
plugins:
|
|
5
5
|
mock-observations:
|
|
6
|
-
path: '
|
|
6
|
+
path: 'builtin'
|
|
7
7
|
method: MockObservations
|
|
8
8
|
global-config:
|
|
9
9
|
timestamp-from: '2024-03-05T00:00:00.000Z'
|
|
@@ -36,4 +36,4 @@ tree:
|
|
|
36
36
|
group:
|
|
37
37
|
- cloud/region
|
|
38
38
|
- name
|
|
39
|
-
inputs: null
|
|
39
|
+
inputs: null
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: cloud-metadata
|
|
2
|
+
description: cloud/instance-type instance type is not supported in the cloud vendor
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
outputs: ['yaml']
|
|
6
|
+
plugins:
|
|
7
|
+
cloud-metadata:
|
|
8
|
+
method: CloudMetadata
|
|
9
|
+
path: "@grnsft/if-plugins"
|
|
10
|
+
tree:
|
|
11
|
+
children:
|
|
12
|
+
child:
|
|
13
|
+
pipeline:
|
|
14
|
+
- cloud-metadata
|
|
15
|
+
config:
|
|
16
|
+
inputs:
|
|
17
|
+
- timestamp: 2023-07-06T00:00 # [KEYWORD] [NO-SUBFIELDS] time when measurement occurred
|
|
18
|
+
cloud/vendor: aws
|
|
19
|
+
cloud/instance-type: m6
|
|
20
|
+
duration: 100
|
|
21
|
+
cpu/utilization: 10
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: cloud-metadata
|
|
2
|
+
description: failing because cloud/vendor is not provided
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
outputs: ['yaml']
|
|
6
|
+
plugins:
|
|
7
|
+
cloud-metadata:
|
|
8
|
+
method: CloudMetadata
|
|
9
|
+
path: "@grnsft/if-plugins"
|
|
10
|
+
tree:
|
|
11
|
+
children:
|
|
12
|
+
child:
|
|
13
|
+
pipeline:
|
|
14
|
+
- cloud-metadata
|
|
15
|
+
config:
|
|
16
|
+
inputs:
|
|
17
|
+
- timestamp: 2023-07-06T00:00 # [KEYWORD] [NO-SUBFIELDS] time when measurement occurred
|
|
18
|
+
#cloud/vendor: aws
|
|
19
|
+
cloud/instance-type: m5n.large
|
|
20
|
+
duration: 100
|
|
21
|
+
cpu/utilization: 10
|