@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
package/github-processes.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
- [`if`](https://github.com/Green-Software-Foundation/if)
|
|
5
5
|
- source code for the IF
|
|
6
|
-
- [`if-plugins`](https://github.com/Green-Software-Foundation/if-plugins)
|
|
6
|
+
- [`if-plugins`](https://github.com/Green-Software-Foundation/if-plugins) **DEPRECATED**
|
|
7
7
|
- source code for standard library of plugins
|
|
8
8
|
- IF core team commit to maintaining these plugins
|
|
9
9
|
- [`if-unofficial-plugins`](https://github.com/Green-Software-Foundation/if-unofficial-plugins)
|
|
@@ -110,47 +110,21 @@ We intend to respond to new PRs and issues within 3 days of the ticket being ope
|
|
|
110
110
|
|
|
111
111
|
## Labels
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
other
|
|
129
|
-
|
|
130
|
-
// size labels
|
|
131
|
-
small
|
|
132
|
-
medium
|
|
133
|
-
large
|
|
134
|
-
|
|
135
|
-
// priority labels
|
|
136
|
-
high-priority
|
|
137
|
-
med-priority
|
|
138
|
-
low-priority
|
|
139
|
-
|
|
140
|
-
//delay explanation labels
|
|
141
|
-
abandoned
|
|
142
|
-
blocked
|
|
143
|
-
backlogged
|
|
144
|
-
|
|
145
|
-
// other labels
|
|
146
|
-
project-management
|
|
147
|
-
agenda
|
|
148
|
-
discussion
|
|
149
|
-
help-wanted
|
|
150
|
-
good-first-issue
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
Each PR is expected to have one label from each category (except `other`) assigned to it at all times.
|
|
113
|
+
| Label | Used by | Description |
|
|
114
|
+
| ---------------- | --------- | ------------------------------------------------------------------------------------------ |
|
|
115
|
+
| blocked | all | The issue is blocked and cannot proceed. |
|
|
116
|
+
| bug | all | Error, flaw or fault |
|
|
117
|
+
| core-only | all | This issue is reserved for the IF core team only |
|
|
118
|
+
| draft | all | The issue is still being written, no need to respond or action on anything. |
|
|
119
|
+
| good-first-issue | all | This issue is a good one for someone looking to get involved with this project/initiative. |
|
|
120
|
+
| help-wanted | all | This issue can be picked up by anyone in the community |
|
|
121
|
+
| needs-response | all | The issue has stalled because someone isn’t responding. |
|
|
122
|
+
| agenda | core team | Use for any meeting agenda or minutes issue. |
|
|
123
|
+
| EPIC | core team | Used to denote an issue that represents a whole epic |
|
|
124
|
+
| initiative | core team | A helper label, needed for GSF internal processes |
|
|
125
|
+
| i-summary | core team | A helper label, needed for GSF internal processes |
|
|
126
|
+
| i-milestone | core team | A helper label, needed for GSF internal processes |
|
|
127
|
+
| project-update | core team | Used to flag project progress updates |
|
|
154
128
|
|
|
155
129
|
|
|
156
130
|
## Releases
|
|
@@ -15,14 +15,14 @@ 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"
|
|
@@ -44,7 +44,7 @@ tree:
|
|
|
44
44
|
pipeline:
|
|
45
45
|
- teads-curve
|
|
46
46
|
- sci-e
|
|
47
|
-
- sci-
|
|
47
|
+
- sci-embodied
|
|
48
48
|
- sci-o
|
|
49
49
|
- time-sync
|
|
50
50
|
- sci
|
|
@@ -87,7 +87,7 @@ tree:
|
|
|
87
87
|
pipeline:
|
|
88
88
|
- teads-curve
|
|
89
89
|
- sci-e
|
|
90
|
-
- sci-
|
|
90
|
+
- sci-embodied
|
|
91
91
|
- sci-o
|
|
92
92
|
- time-sync
|
|
93
93
|
- sci
|
|
@@ -15,14 +15,14 @@ initialize:
|
|
|
15
15
|
method: AzureImporter
|
|
16
16
|
path: "@grnsft/if-unofficial-plugins"
|
|
17
17
|
"try-defaults-1":
|
|
18
|
-
path: "
|
|
18
|
+
path: "builtin"
|
|
19
19
|
method: Coefficient
|
|
20
20
|
global-config:
|
|
21
21
|
input-parameter: grid/carbon-intensity
|
|
22
22
|
coefficient: 0.1
|
|
23
23
|
output-parameter: grid/carbon-intensity
|
|
24
24
|
"try-defaults-2":
|
|
25
|
-
path: "
|
|
25
|
+
path: "builtin"
|
|
26
26
|
method: Coefficient
|
|
27
27
|
global-config:
|
|
28
28
|
input-parameter: network/energy
|
|
@@ -58,4 +58,4 @@ tree:
|
|
|
58
58
|
inputs:
|
|
59
59
|
- timestamp: "2024-04-04T08:00:00.001Z"
|
|
60
60
|
duration: 3600
|
|
61
|
-
energy: 100
|
|
61
|
+
energy: 100
|
|
@@ -7,14 +7,14 @@ initialize:
|
|
|
7
7
|
path: '@grnsft/if-unofficial-plugins'
|
|
8
8
|
method: AzureImporter
|
|
9
9
|
try-defaults-1:
|
|
10
|
-
path: '
|
|
10
|
+
path: 'builtin'
|
|
11
11
|
method: Coefficient
|
|
12
12
|
global-config:
|
|
13
13
|
input-parameter: grid/carbon-intensity
|
|
14
14
|
coefficient: 0.1
|
|
15
15
|
output-parameter: grid/carbon-intensity
|
|
16
16
|
try-defaults-2:
|
|
17
|
-
path: '
|
|
17
|
+
path: 'builtin'
|
|
18
18
|
method: Coefficient
|
|
19
19
|
global-config:
|
|
20
20
|
input-parameter: network/energy
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: mock-observation-demo
|
|
2
|
+
description: a manifest demonstrating how to use the mock observations feature
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
outputs: ['yaml']
|
|
6
|
+
plugins:
|
|
7
|
+
mock-observations:
|
|
8
|
+
kind: plugin
|
|
9
|
+
method: MockObservations
|
|
10
|
+
path: "builtin"
|
|
11
|
+
global-config:
|
|
12
|
+
timestamp-from: 2023-07-06T00:00
|
|
13
|
+
timestamp-to: 2023-07-06T00:10
|
|
14
|
+
duration: 0
|
|
15
|
+
components:
|
|
16
|
+
- cloud/instance-type: A1
|
|
17
|
+
- cloud/instance-type: B1
|
|
18
|
+
generators:
|
|
19
|
+
common:
|
|
20
|
+
region: uk-west
|
|
21
|
+
common-key: common-val
|
|
22
|
+
randint:
|
|
23
|
+
cpu/utilization:
|
|
24
|
+
min: 1
|
|
25
|
+
max: 99
|
|
26
|
+
memory/utilization:
|
|
27
|
+
min: 1
|
|
28
|
+
max: 99
|
|
29
|
+
tree:
|
|
30
|
+
children:
|
|
31
|
+
child:
|
|
32
|
+
pipeline:
|
|
33
|
+
- mock-observations
|
|
34
|
+
inputs:
|
|
@@ -2,13 +2,13 @@ name: pipeline-uninitialized-plugin-error
|
|
|
2
2
|
description: a negative test case that fails due to an uninitialized plugin being invoked in a pipeline
|
|
3
3
|
tags:
|
|
4
4
|
initialize:
|
|
5
|
+
# outputs: ['yaml']
|
|
5
6
|
plugins:
|
|
6
7
|
teads-curve:
|
|
7
8
|
path: '@grnsft/if-unofficial-plugins'
|
|
8
9
|
method: TeadsCurve
|
|
9
10
|
global-config:
|
|
10
11
|
interpolation: spline
|
|
11
|
-
outputs: ['yaml']
|
|
12
12
|
tree:
|
|
13
13
|
children:
|
|
14
14
|
child-0:
|
|
@@ -9,21 +9,21 @@ initialize:
|
|
|
9
9
|
global-config:
|
|
10
10
|
interpolation: spline
|
|
11
11
|
"sum":
|
|
12
|
-
path: "
|
|
12
|
+
path: "builtin"
|
|
13
13
|
method: Sum
|
|
14
14
|
global-config:
|
|
15
15
|
input-parameters:
|
|
16
16
|
- cpu/energy
|
|
17
17
|
- network/energy
|
|
18
18
|
output-parameter: energy
|
|
19
|
-
"sci-
|
|
20
|
-
path: "
|
|
21
|
-
method:
|
|
19
|
+
"sci-embodied":
|
|
20
|
+
path: "builtin"
|
|
21
|
+
method: SciEmbodied
|
|
22
22
|
"sci-o":
|
|
23
23
|
path: "@grnsft/if-plugins"
|
|
24
24
|
method: SciO
|
|
25
25
|
"sci":
|
|
26
|
-
path: "
|
|
26
|
+
path: "builtin"
|
|
27
27
|
method: Sci
|
|
28
28
|
global-config:
|
|
29
29
|
functional-unit: ""
|
|
@@ -43,7 +43,7 @@ tree:
|
|
|
43
43
|
- teads-curve
|
|
44
44
|
- sci-o
|
|
45
45
|
- sum
|
|
46
|
-
- sci-
|
|
46
|
+
- sci-embodied
|
|
47
47
|
- time-sync
|
|
48
48
|
- sci
|
|
49
49
|
config:
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: sci-embodied
|
|
2
|
+
description: receiving incorrect error message when running sci-embodied without `resources-total` issue #716
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
#outputs: ['yaml']
|
|
6
|
+
plugins:
|
|
7
|
+
"sci-embodied": # a model that calculates m from te, tir, el, rr and rtor
|
|
8
|
+
method: SciEmbodied
|
|
9
|
+
path: "builtin"
|
|
10
|
+
tree:
|
|
11
|
+
children:
|
|
12
|
+
child:
|
|
13
|
+
pipeline:
|
|
14
|
+
- sci-embodied # duration & config -> embodied
|
|
15
|
+
defaults:
|
|
16
|
+
device/emissions-embodied: 1533.120 # gCO2eq
|
|
17
|
+
time-reserved: 3600 # 1hr in seconds
|
|
18
|
+
device/expected-lifespan: 94608000 # 3 years in seconds
|
|
19
|
+
resources-reserved: 1
|
|
20
|
+
# resources-total: 8
|
|
21
|
+
inputs:
|
|
22
|
+
- timestamp: 2023-07-06T00:00
|
|
23
|
+
duration: 3600
|
|
@@ -9,7 +9,7 @@ initialize:
|
|
|
9
9
|
global-config:
|
|
10
10
|
interpolation: spline
|
|
11
11
|
"sum":
|
|
12
|
-
path: "
|
|
12
|
+
path: "builtin"
|
|
13
13
|
method: Sum
|
|
14
14
|
global-config:
|
|
15
15
|
input-parameters:
|
|
@@ -17,14 +17,14 @@ initialize:
|
|
|
17
17
|
- network/energy
|
|
18
18
|
output-parameter: energy-sum
|
|
19
19
|
"coefficient":
|
|
20
|
-
path: "
|
|
20
|
+
path: "builtin"
|
|
21
21
|
method: Coefficient
|
|
22
22
|
global-config:
|
|
23
23
|
input-parameter: energy
|
|
24
24
|
coefficient: 2
|
|
25
25
|
output-parameter: energy-doubled
|
|
26
26
|
"multiply":
|
|
27
|
-
path: "
|
|
27
|
+
path: "builtin"
|
|
28
28
|
method: Multiply
|
|
29
29
|
global-config:
|
|
30
30
|
input-parameters: ["cpu/utilization", "duration"]
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: csv-demo
|
|
2
|
+
description: null
|
|
3
|
+
tags: null
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
cloud-instance-metadata:
|
|
7
|
+
path: builtin
|
|
8
|
+
method: CSVLookup
|
|
9
|
+
global-config:
|
|
10
|
+
filepath: >-
|
|
11
|
+
https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/cloud-metdata-azure-instances.csv
|
|
12
|
+
query:
|
|
13
|
+
instance-class: cloud/instance-type
|
|
14
|
+
output: '*'
|
|
15
|
+
extract-processor-name:
|
|
16
|
+
path: builtin
|
|
17
|
+
method: Regex
|
|
18
|
+
global-config:
|
|
19
|
+
parameter: cpu-model-name
|
|
20
|
+
match: /^([^,])+/g
|
|
21
|
+
output: cpu/name
|
|
22
|
+
outputs:
|
|
23
|
+
- yaml
|
|
24
|
+
tree:
|
|
25
|
+
children:
|
|
26
|
+
child:
|
|
27
|
+
pipeline:
|
|
28
|
+
- cloud-instance-metadata
|
|
29
|
+
- extract-processor-name
|
|
30
|
+
inputs:
|
|
31
|
+
- timestamp: 2023-08-06T00:00
|
|
32
|
+
duration: 3600
|
|
33
|
+
cpu/energy: 0.001
|
|
34
|
+
cloud/provider: gcp
|
|
35
|
+
cloud/region: asia-east
|
|
36
|
+
cloud/instance-type: Standard_A1_v2
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
name: mock-cpu-util-to-carbon
|
|
2
2
|
description: a complete pipeline that starts with mocked CPU utilization data and outputs operational carbon in gCO2eq
|
|
3
3
|
initialize:
|
|
4
|
-
outputs: ['yaml']
|
|
4
|
+
#outputs: ['yaml']
|
|
5
5
|
plugins:
|
|
6
6
|
group-by:
|
|
7
7
|
path: 'builtin'
|
|
8
8
|
method: GroupBy
|
|
9
9
|
operational-carbon:
|
|
10
|
-
path: '
|
|
10
|
+
path: 'builtin'
|
|
11
11
|
method: Multiply
|
|
12
12
|
global-config:
|
|
13
13
|
input-parameters: ['cpu/energy', 'grid/carbon-intensity']
|
|
@@ -24,7 +24,7 @@ initialize:
|
|
|
24
24
|
method: CloudMetadata
|
|
25
25
|
path: "@grnsft/if-plugins"
|
|
26
26
|
mock-observations:
|
|
27
|
-
path: '
|
|
27
|
+
path: 'builtin'
|
|
28
28
|
method: MockObservations
|
|
29
29
|
global-config:
|
|
30
30
|
timestamp-from: '2024-03-05T00:00:00.000Z'
|
|
@@ -19,25 +19,32 @@ initialize:
|
|
|
19
19
|
global-config:
|
|
20
20
|
interpolation: spline
|
|
21
21
|
sum:
|
|
22
|
-
path: "
|
|
22
|
+
path: "builtin"
|
|
23
23
|
method: Sum
|
|
24
24
|
global-config:
|
|
25
25
|
input-parameters:
|
|
26
26
|
- cpu/energy
|
|
27
27
|
- network/energy
|
|
28
28
|
output-parameter: energy
|
|
29
|
-
sci-
|
|
30
|
-
path: "
|
|
31
|
-
method:
|
|
29
|
+
sci-embodied:
|
|
30
|
+
path: "builtin"
|
|
31
|
+
method: SciEmbodied
|
|
32
32
|
sci-o:
|
|
33
33
|
path: "@grnsft/if-plugins"
|
|
34
34
|
method: SciO
|
|
35
35
|
sci:
|
|
36
|
-
path: "
|
|
36
|
+
path: "builtin"
|
|
37
37
|
method: Sci
|
|
38
38
|
global-config:
|
|
39
39
|
functional-unit: "requests"
|
|
40
|
-
|
|
40
|
+
"sum-carbon":
|
|
41
|
+
path: "builtin"
|
|
42
|
+
method: Sum
|
|
43
|
+
global-config:
|
|
44
|
+
input-parameters:
|
|
45
|
+
- carbon-operational
|
|
46
|
+
- carbon-embodied
|
|
47
|
+
output-parameter: carbon
|
|
41
48
|
time-sync:
|
|
42
49
|
method: TimeSync
|
|
43
50
|
path: "builtin"
|
|
@@ -60,8 +67,9 @@ tree:
|
|
|
60
67
|
pipeline:
|
|
61
68
|
- teads-curve
|
|
62
69
|
- sum
|
|
63
|
-
- sci-
|
|
70
|
+
- sci-embodied
|
|
64
71
|
- sci-o
|
|
72
|
+
- sum-carbon
|
|
65
73
|
- time-sync
|
|
66
74
|
- sci
|
|
67
75
|
inputs:
|
|
@@ -71,24 +79,28 @@ tree:
|
|
|
71
79
|
duration: 1
|
|
72
80
|
cpu/utilization: 50
|
|
73
81
|
network/energy: 0.000001
|
|
82
|
+
requests: 50
|
|
74
83
|
- timestamp: "2023-12-12T00:00:01.000Z"
|
|
75
84
|
duration: 5
|
|
76
85
|
cpu/utilization: 20
|
|
77
86
|
cloud/instance-type: A1
|
|
78
87
|
cloud/region: uk-west
|
|
79
88
|
network/energy: 0.000001
|
|
89
|
+
requests: 60
|
|
80
90
|
- timestamp: "2023-12-12T00:00:06.000Z"
|
|
81
91
|
duration: 7
|
|
82
92
|
cpu/utilization: 15
|
|
83
93
|
cloud/instance-type: A1
|
|
84
94
|
cloud/region: uk-west
|
|
85
95
|
network/energy: 0.000001
|
|
96
|
+
requests: 70
|
|
86
97
|
- timestamp: "2023-12-12T00:00:13.000Z"
|
|
87
98
|
duration: 30
|
|
88
99
|
cloud/instance-type: A1
|
|
89
100
|
cloud/region: uk-west
|
|
90
101
|
cpu/utilization: 15
|
|
91
102
|
network/energy: 0.000001
|
|
103
|
+
requests: 55
|
|
92
104
|
child-1:
|
|
93
105
|
defaults:
|
|
94
106
|
cpu/thermal-design-power: 100
|
|
@@ -101,8 +113,9 @@ tree:
|
|
|
101
113
|
pipeline:
|
|
102
114
|
- teads-curve
|
|
103
115
|
- sum
|
|
104
|
-
- sci-
|
|
116
|
+
- sci-embodied
|
|
105
117
|
- sci-o
|
|
118
|
+
- sum-carbon
|
|
106
119
|
- time-sync
|
|
107
120
|
- sci
|
|
108
121
|
inputs:
|
|
@@ -112,24 +125,28 @@ tree:
|
|
|
112
125
|
duration: 1
|
|
113
126
|
cpu/utilization: 50
|
|
114
127
|
network/energy: 0.000001
|
|
128
|
+
requests: 10
|
|
115
129
|
- timestamp: "2023-12-12T00:00:01.000Z"
|
|
116
130
|
duration: 5
|
|
117
131
|
cpu/utilization: 20
|
|
118
132
|
cloud/instance-type: A1
|
|
119
133
|
cloud/region: uk-west
|
|
120
134
|
network/energy: 0.000001
|
|
135
|
+
requests: 90
|
|
121
136
|
- timestamp: "2023-12-12T00:00:06.000Z"
|
|
122
137
|
duration: 7
|
|
123
138
|
cpu/utilization: 15
|
|
124
139
|
cloud/instance-type: A1
|
|
125
140
|
cloud/region: uk-west
|
|
126
141
|
network/energy: 0.000001
|
|
142
|
+
requests: 30
|
|
127
143
|
- timestamp: "2023-12-12T00:00:13.000Z"
|
|
128
144
|
duration: 30
|
|
129
145
|
cloud/instance-type: A1
|
|
130
146
|
cloud/region: uk-west
|
|
131
147
|
cpu/utilization: 15
|
|
132
148
|
network/energy: 0.000001
|
|
149
|
+
requests: 22
|
|
133
150
|
child-2:
|
|
134
151
|
children:
|
|
135
152
|
child-2-0:
|
|
@@ -144,8 +161,9 @@ tree:
|
|
|
144
161
|
pipeline:
|
|
145
162
|
- teads-curve
|
|
146
163
|
- sum
|
|
147
|
-
- sci-
|
|
164
|
+
- sci-embodied
|
|
148
165
|
- sci-o
|
|
166
|
+
- sum-carbon
|
|
149
167
|
- time-sync
|
|
150
168
|
- sci
|
|
151
169
|
inputs:
|
|
@@ -155,24 +173,28 @@ tree:
|
|
|
155
173
|
duration: 1
|
|
156
174
|
cpu/utilization: 50
|
|
157
175
|
network/energy: 0.000001
|
|
176
|
+
requests: 50
|
|
158
177
|
- timestamp: "2023-12-12T00:00:01.000Z"
|
|
159
178
|
duration: 5
|
|
160
179
|
cpu/utilization: 20
|
|
161
180
|
cloud/instance-type: A1
|
|
162
181
|
cloud/region: uk-west
|
|
163
182
|
network/energy: 0.000001
|
|
183
|
+
requests: 65
|
|
164
184
|
- timestamp: "2023-12-12T00:00:06.000Z"
|
|
165
185
|
duration: 7
|
|
166
186
|
cpu/utilization: 15
|
|
167
187
|
cloud/instance-type: A1
|
|
168
188
|
cloud/region: uk-west
|
|
169
189
|
network/energy: 0.000001
|
|
190
|
+
requests: 80
|
|
170
191
|
- timestamp: "2023-12-12T00:00:13.000Z"
|
|
171
192
|
duration: 30
|
|
172
193
|
cloud/instance-type: A1
|
|
173
194
|
cloud/region: uk-west
|
|
174
195
|
cpu/utilization: 15
|
|
175
196
|
network/energy: 0.000001
|
|
197
|
+
requests: 40
|
|
176
198
|
child-2-1:
|
|
177
199
|
defaults:
|
|
178
200
|
cpu/thermal-design-power: 100
|
|
@@ -185,8 +207,9 @@ tree:
|
|
|
185
207
|
pipeline:
|
|
186
208
|
- teads-curve
|
|
187
209
|
- sum
|
|
188
|
-
- sci-
|
|
210
|
+
- sci-embodied
|
|
189
211
|
- sci-o
|
|
212
|
+
- sum-carbon
|
|
190
213
|
- time-sync
|
|
191
214
|
- sci
|
|
192
215
|
inputs:
|
|
@@ -196,21 +219,25 @@ tree:
|
|
|
196
219
|
duration: 1
|
|
197
220
|
cpu/utilization: 50
|
|
198
221
|
network/energy: 0.000001
|
|
222
|
+
requests: 50
|
|
199
223
|
- timestamp: "2023-12-12T00:00:01.000Z"
|
|
200
224
|
duration: 5
|
|
201
225
|
cpu/utilization: 20
|
|
202
226
|
cloud/instance-type: A1
|
|
203
227
|
cloud/region: uk-west
|
|
204
228
|
network/energy: 0.000001
|
|
229
|
+
requests: 50
|
|
205
230
|
- timestamp: "2023-12-12T00:00:06.000Z"
|
|
206
231
|
duration: 7
|
|
207
232
|
cpu/utilization: 15
|
|
208
233
|
cloud/instance-type: A1
|
|
209
234
|
cloud/region: uk-west
|
|
210
235
|
network/energy: 0.000001
|
|
236
|
+
requests: 60
|
|
211
237
|
- timestamp: "2023-12-12T00:00:13.000Z"
|
|
212
238
|
duration: 30
|
|
213
239
|
cloud/instance-type: A1
|
|
214
240
|
cloud/region: uk-west
|
|
215
241
|
cpu/utilization: 15
|
|
216
242
|
network/energy: 0.000001
|
|
243
|
+
requests: 40
|
|
@@ -9,25 +9,32 @@ initialize:
|
|
|
9
9
|
global-config:
|
|
10
10
|
interpolation: spline
|
|
11
11
|
"sum":
|
|
12
|
-
path: "
|
|
12
|
+
path: "builtin"
|
|
13
13
|
method: Sum
|
|
14
14
|
global-config:
|
|
15
15
|
input-parameters:
|
|
16
16
|
- cpu/energy
|
|
17
17
|
- network/energy
|
|
18
18
|
output-parameter: energy
|
|
19
|
-
"sci-
|
|
20
|
-
path: "
|
|
21
|
-
method:
|
|
19
|
+
"sci-embodied":
|
|
20
|
+
path: "builtin"
|
|
21
|
+
method: SciEmbodied
|
|
22
22
|
"sci-o":
|
|
23
23
|
path: "@grnsft/if-plugins"
|
|
24
24
|
method: SciO
|
|
25
25
|
"sci":
|
|
26
|
-
path: "
|
|
26
|
+
path: "builtin"
|
|
27
27
|
method: Sci
|
|
28
28
|
global-config:
|
|
29
|
-
functional-unit: ""
|
|
30
|
-
|
|
29
|
+
functional-unit: "component"
|
|
30
|
+
"sum-carbon":
|
|
31
|
+
path: "builtin"
|
|
32
|
+
method: Sum
|
|
33
|
+
global-config:
|
|
34
|
+
input-parameters:
|
|
35
|
+
- carbon-operational
|
|
36
|
+
- carbon-embodied
|
|
37
|
+
output-parameter: carbon
|
|
31
38
|
"time-sync":
|
|
32
39
|
method: TimeSync
|
|
33
40
|
path: "builtin"
|
|
@@ -42,9 +49,9 @@ tree:
|
|
|
42
49
|
pipeline:
|
|
43
50
|
- teads-curve
|
|
44
51
|
- sum
|
|
45
|
-
- sci-
|
|
52
|
+
- sci-embodied
|
|
46
53
|
- sci-o
|
|
47
|
-
-
|
|
54
|
+
- sum-carbon
|
|
48
55
|
- sci
|
|
49
56
|
config:
|
|
50
57
|
defaults:
|
|
@@ -55,6 +62,7 @@ tree:
|
|
|
55
62
|
device/expected-lifespan: 94608000 # 3 years in seconds
|
|
56
63
|
resources-reserved: 1
|
|
57
64
|
resources-total: 8
|
|
65
|
+
component: 1
|
|
58
66
|
inputs:
|
|
59
67
|
- timestamp: "2023-12-12T00:00:00.000Z"
|
|
60
68
|
cloud/instance-type: A1
|