@grnsft/if 0.3.4 → 0.4.0-beta.1
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/.lintstagedrc.js +6 -0
- package/README.md +12 -8
- package/Refactor-migration-guide.md +6 -6
- package/build/builtins/coefficient/index.d.ts +3 -0
- package/build/builtins/coefficient/index.js +51 -0
- package/build/builtins/coefficient/types.d.ts +5 -0
- package/build/builtins/coefficient/types.js +3 -0
- package/build/builtins/csv-lookup/index.d.ts +2 -0
- package/build/builtins/csv-lookup/index.js +181 -0
- package/build/builtins/divide/index.d.ts +2 -0
- package/build/builtins/divide/index.js +67 -0
- package/build/builtins/exponent/index.d.ts +3 -0
- package/build/builtins/exponent/index.js +72 -0
- package/build/builtins/exponent/types.d.ts +5 -0
- package/build/builtins/exponent/types.js +3 -0
- package/build/builtins/export-csv-raw.js +4 -1
- package/build/builtins/export-csv.js +4 -1
- package/build/builtins/export-log.js +4 -2
- package/build/builtins/export-yaml.js +4 -1
- package/build/builtins/index.d.ts +13 -0
- package/build/builtins/index.js +28 -2
- package/build/builtins/interpolation/index.d.ts +2 -0
- package/build/builtins/interpolation/index.js +146 -0
- package/build/builtins/interpolation/types.d.ts +5 -0
- package/build/builtins/interpolation/types.js +10 -0
- package/build/builtins/mock-observations/helpers/common-generator.d.ts +3 -0
- package/build/builtins/mock-observations/helpers/common-generator.js +32 -0
- package/build/builtins/mock-observations/helpers/rand-int-generator.d.ts +3 -0
- package/build/builtins/mock-observations/helpers/rand-int-generator.js +58 -0
- package/build/builtins/mock-observations/index.d.ts +3 -0
- package/build/builtins/mock-observations/index.js +116 -0
- package/build/builtins/mock-observations/interfaces/index.d.ts +6 -0
- package/build/builtins/mock-observations/interfaces/index.js +3 -0
- package/build/builtins/mock-observations/types.d.ts +13 -0
- package/build/builtins/mock-observations/types.js +3 -0
- package/build/builtins/multiply/index.d.ts +3 -0
- package/build/builtins/multiply/index.js +63 -0
- package/build/builtins/multiply/types.d.ts +4 -0
- package/build/builtins/multiply/types.js +3 -0
- package/build/builtins/regex/index.d.ts +3 -0
- package/build/builtins/regex/index.js +78 -0
- package/build/builtins/sci/config.d.ts +1 -0
- package/build/builtins/sci/config.js +44 -0
- package/build/builtins/sci/index.d.ts +3 -0
- package/build/builtins/sci/index.js +69 -0
- package/build/builtins/sci-embodied/index.d.ts +2 -0
- package/build/builtins/sci-embodied/index.js +115 -0
- package/build/builtins/shell/index.d.ts +3 -0
- package/build/builtins/shell/index.js +58 -0
- package/build/builtins/subtract/index.d.ts +3 -0
- package/build/builtins/subtract/index.js +75 -0
- package/build/builtins/subtract/types.d.ts +4 -0
- package/build/builtins/subtract/types.js +3 -0
- package/build/builtins/sum/index.d.ts +3 -0
- package/build/builtins/sum/index.js +61 -0
- package/build/builtins/sum/types.d.ts +4 -0
- package/build/builtins/sum/types.js +3 -0
- package/build/config/config.d.ts +8 -2
- package/build/config/config.js +34 -1
- package/build/config/strings.d.ts +22 -0
- package/build/config/strings.js +23 -1
- package/build/diff.d.ts +2 -0
- package/build/diff.js +41 -0
- package/build/index.js +8 -4
- package/build/lib/aggregate.js +5 -1
- package/build/lib/compare.d.ts +10 -0
- package/build/lib/compare.js +56 -0
- package/build/lib/compute.js +9 -1
- package/build/lib/environment.js +9 -3
- package/build/lib/exhaust.js +3 -2
- package/build/lib/initialize.js +5 -2
- package/build/lib/load.d.ts +48 -0
- package/build/lib/load.js +51 -2
- package/build/lib/parameterize.js +8 -4
- package/build/types/common.d.ts +4 -0
- package/build/types/common.js +3 -0
- package/build/types/helpers.d.ts +4 -0
- package/build/types/helpers.js +3 -0
- package/build/types/interface.d.ts +2 -1
- package/build/types/interface.js +1 -1
- package/build/types/lib/compare.d.ts +7 -0
- package/build/types/lib/compare.js +3 -0
- package/build/types/process-args.d.ts +7 -1
- package/build/types/process-args.js +1 -1
- package/build/types/util/args.d.ts +4 -0
- package/build/types/util/args.js +3 -0
- package/build/util/args.d.ts +7 -2
- package/build/util/args.js +49 -11
- package/build/util/debug-logger.d.ts +4 -0
- package/build/util/debug-logger.js +117 -0
- package/build/util/errors.d.ts +1 -1
- package/build/util/errors.js +6 -1
- package/build/util/helpers.d.ts +23 -0
- package/build/util/helpers.js +116 -2
- package/build/util/log-memoize.d.ts +1 -1
- package/build/util/log-memoize.js +1 -1
- package/build/util/validations.d.ts +59 -51
- package/build/util/validations.js +49 -18
- 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/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/.env +0 -5
- package/coverage/clover.xml +0 -1590
- package/coverage/coverage-final.json +0 -50
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/builtins/coefficient/index.html +0 -116
- package/coverage/lcov-report/builtins/coefficient/index.ts.html +0 -295
- package/coverage/lcov-report/builtins/csv-lookup/index.html +0 -116
- package/coverage/lcov-report/builtins/csv-lookup/index.ts.html +0 -832
- package/coverage/lcov-report/builtins/divide/index.html +0 -116
- package/coverage/lcov-report/builtins/divide/index.ts.html +0 -361
- package/coverage/lcov-report/builtins/exponent/index.html +0 -116
- package/coverage/lcov-report/builtins/exponent/index.ts.html +0 -355
- package/coverage/lcov-report/builtins/export-csv-raw.ts.html +0 -553
- package/coverage/lcov-report/builtins/export-csv.ts.html +0 -433
- package/coverage/lcov-report/builtins/export-log.ts.html +0 -145
- package/coverage/lcov-report/builtins/export-yaml.ts.html +0 -184
- package/coverage/lcov-report/builtins/group-by.ts.html +0 -364
- package/coverage/lcov-report/builtins/index.html +0 -206
- package/coverage/lcov-report/builtins/index.ts.html +0 -130
- package/coverage/lcov-report/builtins/interpolation/index.html +0 -131
- package/coverage/lcov-report/builtins/interpolation/index.ts.html +0 -670
- package/coverage/lcov-report/builtins/interpolation/types.ts.html +0 -100
- package/coverage/lcov-report/builtins/mock-observations/helpers/common-generator.ts.html +0 -181
- package/coverage/lcov-report/builtins/mock-observations/helpers/index.html +0 -131
- package/coverage/lcov-report/builtins/mock-observations/helpers/rand-int-generator.ts.html +0 -295
- package/coverage/lcov-report/builtins/mock-observations/index.html +0 -116
- package/coverage/lcov-report/builtins/mock-observations/index.ts.html +0 -613
- package/coverage/lcov-report/builtins/multiply/index.html +0 -116
- package/coverage/lcov-report/builtins/multiply/index.ts.html +0 -337
- package/coverage/lcov-report/builtins/regex/index.html +0 -116
- package/coverage/lcov-report/builtins/regex/index.ts.html +0 -379
- package/coverage/lcov-report/builtins/sci/config.ts.html +0 -205
- package/coverage/lcov-report/builtins/sci/index.html +0 -116
- package/coverage/lcov-report/builtins/sci/index.ts.html +0 -331
- package/coverage/lcov-report/builtins/sci-embodied/index.html +0 -116
- package/coverage/lcov-report/builtins/sci-embodied/index.ts.html +0 -481
- package/coverage/lcov-report/builtins/shell/index.html +0 -116
- package/coverage/lcov-report/builtins/shell/index.ts.html +0 -283
- package/coverage/lcov-report/builtins/subtract/index.html +0 -116
- package/coverage/lcov-report/builtins/subtract/index.ts.html +0 -373
- package/coverage/lcov-report/builtins/sum/index.html +0 -116
- package/coverage/lcov-report/builtins/sum/index.ts.html +0 -340
- package/coverage/lcov-report/builtins/time-sync.ts.html +0 -1459
- package/coverage/lcov-report/config/config.ts.html +0 -334
- package/coverage/lcov-report/config/index.html +0 -161
- package/coverage/lcov-report/config/index.ts.html +0 -94
- package/coverage/lcov-report/config/params.ts.html +0 -697
- package/coverage/lcov-report/config/strings.ts.html +0 -415
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -386
- package/coverage/lcov-report/lib/aggregate.ts.html +0 -331
- package/coverage/lcov-report/lib/compare.ts.html +0 -283
- package/coverage/lcov-report/lib/compute.ts.html +0 -391
- package/coverage/lcov-report/lib/environment.ts.html +0 -343
- package/coverage/lcov-report/lib/exhaust.ts.html +0 -283
- package/coverage/lcov-report/lib/index.html +0 -221
- package/coverage/lcov-report/lib/initialize.ts.html +0 -388
- package/coverage/lcov-report/lib/load.ts.html +0 -268
- package/coverage/lcov-report/lib/parameterize.ts.html +0 -283
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/types/aggregation.ts.html +0 -94
- package/coverage/lcov-report/types/index.html +0 -146
- package/coverage/lcov-report/types/interface.ts.html +0 -181
- package/coverage/lcov-report/types/parameters.ts.html +0 -106
- package/coverage/lcov-report/util/aggregation-helper.ts.html +0 -286
- package/coverage/lcov-report/util/args.ts.html +0 -508
- package/coverage/lcov-report/util/errors.ts.html +0 -232
- package/coverage/lcov-report/util/helpers.ts.html +0 -613
- package/coverage/lcov-report/util/index.html +0 -266
- package/coverage/lcov-report/util/json.ts.html +0 -115
- package/coverage/lcov-report/util/log-memoize.ts.html +0 -145
- package/coverage/lcov-report/util/logger.ts.html +0 -151
- package/coverage/lcov-report/util/os-checker.ts.html +0 -421
- package/coverage/lcov-report/util/plugin-storage.ts.html +0 -199
- package/coverage/lcov-report/util/validations.ts.html +0 -526
- package/coverage/lcov-report/util/yaml.ts.html +0 -193
- package/coverage/lcov.info +0 -2811
- package/src/__tests__/integration/manifest/sci-e.yaml +0 -23
|
@@ -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
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: coefficient-demo
|
|
2
|
+
description: value of output-param is missing
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
outputs: ['yaml']
|
|
6
|
+
plugins:
|
|
7
|
+
coefficient:
|
|
8
|
+
method: Coefficient
|
|
9
|
+
path: "builtin"
|
|
10
|
+
global-config:
|
|
11
|
+
input-parameter: "carbon"
|
|
12
|
+
coefficient: 3
|
|
13
|
+
output-parameter:
|
|
14
|
+
tree:
|
|
15
|
+
children:
|
|
16
|
+
child:
|
|
17
|
+
pipeline:
|
|
18
|
+
- coefficient
|
|
19
|
+
config:
|
|
20
|
+
sum:
|
|
21
|
+
inputs:
|
|
22
|
+
- timestamp: 2023-08-06T00:00
|
|
23
|
+
duration: 3600
|
|
24
|
+
carbon: 30
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: csv-lookup-demo
|
|
2
|
+
description:
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
# outputs:
|
|
6
|
+
# - yaml
|
|
7
|
+
plugins:
|
|
8
|
+
cloud-metadata:
|
|
9
|
+
method: CSVLookup
|
|
10
|
+
path: 'builtin'
|
|
11
|
+
global-config:
|
|
12
|
+
filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/region-metadata.csv
|
|
13
|
+
query:
|
|
14
|
+
cloud-provider: "nonexistant"
|
|
15
|
+
cloud-region: "cloud/region"
|
|
16
|
+
output: "*"
|
|
17
|
+
tree:
|
|
18
|
+
children:
|
|
19
|
+
child:
|
|
20
|
+
pipeline:
|
|
21
|
+
- cloud-metadata
|
|
22
|
+
inputs:
|
|
23
|
+
- timestamp: 2023-08-06T00:00
|
|
24
|
+
duration: 3600
|
|
25
|
+
cloud/provider: Google Cloud
|
|
26
|
+
cloud/region: asia-east1
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: csv-lookup-demo
|
|
2
|
+
description:
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
# outputs:
|
|
6
|
+
# - yaml
|
|
7
|
+
plugins:
|
|
8
|
+
cloud-metadata:
|
|
9
|
+
method: CSVLookup
|
|
10
|
+
path: 'builtin'
|
|
11
|
+
global-config:
|
|
12
|
+
filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/region-metadata.csv
|
|
13
|
+
query:
|
|
14
|
+
cloud-provider: "cloud/provider"
|
|
15
|
+
cloud-region: "cloud/region"
|
|
16
|
+
output: "*"
|
|
17
|
+
tree:
|
|
18
|
+
children:
|
|
19
|
+
child:
|
|
20
|
+
pipeline:
|
|
21
|
+
- cloud-metadata
|
|
22
|
+
inputs:
|
|
23
|
+
- timestamp: 2023-08-06T00:00
|
|
24
|
+
duration: 3600
|
|
25
|
+
cloud/provider: Google Cloud
|
|
26
|
+
cloud/region: asia-east1
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: csv-lookup-demo
|
|
2
|
+
description:
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
# outputs:
|
|
6
|
+
# - yaml
|
|
7
|
+
plugins:
|
|
8
|
+
cloud-metadata:
|
|
9
|
+
method: CSVLookup
|
|
10
|
+
path: 'builtin'
|
|
11
|
+
global-config:
|
|
12
|
+
filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/region-metadata.csv
|
|
13
|
+
query:
|
|
14
|
+
cloud-provider: "cloud/provider"
|
|
15
|
+
cloud-region: "cloud/region"
|
|
16
|
+
output: ['em-zone-id','renamed-em-zone-data']
|
|
17
|
+
tree:
|
|
18
|
+
children:
|
|
19
|
+
child:
|
|
20
|
+
pipeline:
|
|
21
|
+
- cloud-metadata
|
|
22
|
+
inputs:
|
|
23
|
+
- timestamp: 2023-08-06T00:00
|
|
24
|
+
duration: 3600
|
|
25
|
+
cloud/provider: Google Cloud
|
|
26
|
+
cloud/region: asia-east1
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: csv-lookup-demo
|
|
2
|
+
description:
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
# outputs:
|
|
6
|
+
# - yaml
|
|
7
|
+
plugins:
|
|
8
|
+
cloud-metadata:
|
|
9
|
+
method: CSVLookup
|
|
10
|
+
path: 'builtin'
|
|
11
|
+
global-config:
|
|
12
|
+
filepath: https://raw.githubusercontent.com/Green-Software-Foundation/if-data/main/region-metadata.csv
|
|
13
|
+
query:
|
|
14
|
+
cloud-provider: "cloud/provider"
|
|
15
|
+
cloud-region: "cloud/region"
|
|
16
|
+
output: "*"
|
|
17
|
+
tree:
|
|
18
|
+
children:
|
|
19
|
+
child:
|
|
20
|
+
pipeline:
|
|
21
|
+
- cloud-metadata
|
|
22
|
+
inputs:
|
|
23
|
+
- timestamp: 2023-08-06T00:00
|
|
24
|
+
duration: 3600
|
|
25
|
+
cloud/provider: Google Cloud
|
|
26
|
+
cloud/region: asia-east-1
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: divide
|
|
2
|
+
description: denominator is invalid, denominator is
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
# outputs: ['yaml']
|
|
6
|
+
plugins:
|
|
7
|
+
cloud-metadata:
|
|
8
|
+
method: CloudMetadata
|
|
9
|
+
path: "@grnsft/if-plugins"
|
|
10
|
+
divide:
|
|
11
|
+
method: Divide
|
|
12
|
+
path: "builtin"
|
|
13
|
+
global-config:
|
|
14
|
+
numerator: vcpus-allocated
|
|
15
|
+
denominator: 0
|
|
16
|
+
output: cpu/number-cores
|
|
17
|
+
boavizta-cpu:
|
|
18
|
+
method: BoaviztaCpuOutput
|
|
19
|
+
path: "@grnsft/if-unofficial-plugins"
|
|
20
|
+
global-config:
|
|
21
|
+
allocation: LINEAR
|
|
22
|
+
verbose: true
|
|
23
|
+
tree:
|
|
24
|
+
children:
|
|
25
|
+
child:
|
|
26
|
+
pipeline:
|
|
27
|
+
- cloud-metadata
|
|
28
|
+
- divide
|
|
29
|
+
- boavizta-cpu
|
|
30
|
+
config:
|
|
31
|
+
divide:
|
|
32
|
+
defaults:
|
|
33
|
+
cloud/vendor: aws
|
|
34
|
+
cloud/instance-type: m5n.large
|
|
35
|
+
cpu/name: Intel® Core™ i7-1185G7
|
|
36
|
+
inputs:
|
|
37
|
+
- timestamp: 2023-08-06T00:00
|
|
38
|
+
duration: 3600
|
|
39
|
+
cpu/utilization: 80
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: divide
|
|
2
|
+
description: success path
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
# outputs: ['yaml']
|
|
6
|
+
plugins:
|
|
7
|
+
cloud-metadata:
|
|
8
|
+
method: CloudMetadata
|
|
9
|
+
path: "@grnsft/if-plugins"
|
|
10
|
+
divide:
|
|
11
|
+
method: Divide
|
|
12
|
+
path: "builtin"
|
|
13
|
+
global-config:
|
|
14
|
+
#numerator: vcpus-allocated
|
|
15
|
+
denominator: 2
|
|
16
|
+
output: cpu/number-cores
|
|
17
|
+
boavizta-cpu:
|
|
18
|
+
method: BoaviztaCpuOutput
|
|
19
|
+
path: "@grnsft/if-unofficial-plugins"
|
|
20
|
+
global-config:
|
|
21
|
+
allocation: LINEAR
|
|
22
|
+
verbose: true
|
|
23
|
+
tree:
|
|
24
|
+
children:
|
|
25
|
+
child:
|
|
26
|
+
pipeline:
|
|
27
|
+
- cloud-metadata
|
|
28
|
+
- divide
|
|
29
|
+
- boavizta-cpu
|
|
30
|
+
config:
|
|
31
|
+
divide:
|
|
32
|
+
defaults:
|
|
33
|
+
cloud/vendor: aws
|
|
34
|
+
cloud/instance-type: m5n.large
|
|
35
|
+
cpu/name: Intel® Core™ i7-1185G7
|
|
36
|
+
inputs:
|
|
37
|
+
- timestamp: 2023-08-06T00:00
|
|
38
|
+
duration: 3600
|
|
39
|
+
cpu/utilization: 80
|
|
@@ -2,14 +2,14 @@ name: divide
|
|
|
2
2
|
description: success path
|
|
3
3
|
tags:
|
|
4
4
|
initialize:
|
|
5
|
-
outputs: ['yaml']
|
|
5
|
+
# outputs: ['yaml']
|
|
6
6
|
plugins:
|
|
7
7
|
cloud-metadata:
|
|
8
8
|
method: CloudMetadata
|
|
9
9
|
path: "@grnsft/if-plugins"
|
|
10
10
|
divide:
|
|
11
11
|
method: Divide
|
|
12
|
-
path: "
|
|
12
|
+
path: "builtin"
|
|
13
13
|
global-config:
|
|
14
14
|
numerator: vcpus-allocated
|
|
15
15
|
denominator: 2
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: groupby
|
|
2
|
+
description:
|
|
3
|
+
initialize:
|
|
4
|
+
# outputs: ['yaml']
|
|
5
|
+
plugins:
|
|
6
|
+
group-by:
|
|
7
|
+
path: "builtin"
|
|
8
|
+
method: GroupBy
|
|
9
|
+
tree:
|
|
10
|
+
children:
|
|
11
|
+
my-app:
|
|
12
|
+
pipeline:
|
|
13
|
+
- group-by
|
|
14
|
+
config:
|
|
15
|
+
group-by:
|
|
16
|
+
group:
|
|
17
|
+
- cloud/region
|
|
18
|
+
- cloud/instance-type
|
|
19
|
+
inputs:
|
|
20
|
+
- timestamp: 2023-07-06T00:00
|
|
21
|
+
duration: 300
|
|
22
|
+
cloud/instance-type: A1
|
|
23
|
+
cloud/region: uk-west
|
|
24
|
+
cpu/utilization: 99
|
|
25
|
+
- timestamp: 2023-07-06T05:00
|
|
26
|
+
duration: 300
|
|
27
|
+
cloud/instance-type: A1
|
|
28
|
+
cloud/region: uk-west
|
|
29
|
+
cpu/utilization: 23
|
|
30
|
+
- timestamp: 2023-07-06T10:00
|
|
31
|
+
duration: 300
|
|
32
|
+
cloud/instance-type: A1
|
|
33
|
+
cloud/region: uk-west
|
|
34
|
+
cpu/utilization: 12
|
|
35
|
+
- timestamp: 2023-07-06T00:00 # note this time restarts at the start timstamp
|
|
36
|
+
duration: 300
|
|
37
|
+
cloud/instance-type: B1
|
|
38
|
+
cloud/region: uk-west
|
|
39
|
+
cpu/utilization: 11
|
|
40
|
+
- timestamp: 2023-07-06T05:00
|
|
41
|
+
duration: 300
|
|
42
|
+
cloud/instance-type: B1
|
|
43
|
+
cloud/region: uk-west
|
|
44
|
+
cpu/utilization: 67
|
|
45
|
+
- timestamp: 2023-07-06T10:00
|
|
46
|
+
duration: 300
|
|
47
|
+
#cloud/instance-type: B1 -- missing value
|
|
48
|
+
cloud/region: uk-west
|
|
49
|
+
cpu/utilization: 1
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: interpolation-demo
|
|
2
|
+
description: simple demo of interpolation plugin
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
interpolation:
|
|
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: "result"
|
|
15
|
+
|
|
16
|
+
tree:
|
|
17
|
+
children:
|
|
18
|
+
child:
|
|
19
|
+
pipeline:
|
|
20
|
+
- interpolation
|
|
21
|
+
inputs:
|
|
22
|
+
- timestamp: 2023-07-06T00:00
|
|
23
|
+
duration: 3600
|
|
24
|
+
cpu/utilization: 45
|