@grnsft/if 0.3.2 → 0.3.3-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 +3 -0
- package/.release-it.json +18 -0
- package/CONTRIBUTING.md +77 -4
- package/README.md +34 -26
- package/build/builtins/export-csv-raw.js +4 -4
- package/build/builtins/export-csv.js +5 -5
- package/build/builtins/export-log.js +26 -2
- package/build/builtins/export-yaml.js +3 -3
- package/build/config/config.d.ts +3 -3
- package/build/config/config.js +23 -27
- package/build/config/strings.d.ts +1 -0
- package/build/config/strings.js +8 -3
- package/build/index.js +23 -14
- package/build/lib/environment.d.ts +5 -0
- package/build/lib/environment.js +69 -0
- package/build/lib/exhaust.d.ts +2 -1
- package/build/lib/exhaust.js +11 -9
- package/build/lib/initialize.d.ts +2 -2
- package/build/lib/initialize.js +5 -5
- package/build/lib/load.d.ts +1 -29
- package/build/lib/load.js +2 -5
- package/build/types/environment.d.ts +18 -0
- package/build/types/environment.js +3 -0
- package/build/types/manifest.d.ts +1 -0
- package/build/types/manifest.js +1 -1
- package/build/types/process-args.d.ts +13 -1
- package/build/types/process-args.js +1 -1
- package/build/util/args.d.ts +3 -5
- package/build/util/args.js +14 -10
- package/build/util/errors.d.ts +1 -1
- package/build/util/errors.js +2 -3
- package/build/util/helpers.d.ts +6 -0
- package/build/util/helpers.js +9 -3
- package/build/util/os-checker.d.ts +7 -0
- package/build/util/os-checker.js +97 -0
- package/build/util/validations.d.ts +90 -4
- package/build/util/validations.js +14 -2
- package/github-processes.md +10 -0
- package/{examples/manifests/pipeline-demo-2.yml → manifests/bugs/aggregation-error-wrong-metric.yml} +8 -34
- package/manifests/bugs/azure-importer-ignoring-defaults.yml +61 -0
- package/manifests/bugs/azure-importer-incorrect-calculation.yml +56 -0
- package/manifests/bugs/initialize-error-no-config.yml +27 -0
- package/manifests/bugs/initialize-error-no-path.yml +28 -0
- package/manifests/bugs/initialize-error-no-plugins.yml +23 -0
- package/manifests/bugs/input-error-missing-duration.yml +21 -0
- package/manifests/bugs/pipeline-error-naming-mismatch.yml +28 -0
- package/manifests/bugs/pipeline-error-uninitialized-plugin.yml +29 -0
- package/{examples/manifests/boavizta-pipeline.yml → manifests/bugs/pipeline-ordering-error.yml} +7 -10
- package/{examples/manifests → manifests/examples}/basic.yml +3 -2
- package/{examples/manifests → manifests/examples}/generics.yml +2 -2
- package/{examples/manifests/asim-demo.yml → manifests/examples/mock-cpu-util-to-carbon.yml} +3 -7
- package/{examples/manifests → manifests/examples}/nesting.yml +3 -2
- package/{examples/manifests → manifests/examples}/pipeline-teads-sci.yml +1 -1
- package/{examples/manifests/pipeline-demo.yml → manifests/examples/pipeline-with-aggregate.yml} +2 -2
- package/{examples/manifests → manifests/examples}/pipeline-with-mocks.yml +3 -2
- package/manifests/features/aggregate-horizontal.yml +44 -0
- package/manifests/features/aggregate-vertical.yml +44 -0
- package/manifests/features/aggregate.yml +44 -0
- package/manifests/integrations/mock-obs-groupby.yml +39 -0
- package/manifests/integrations/mock-obs-time-sync.yml +65 -0
- package/manifests/plugins/cloud-metadata/failure-invalid-vendor.yaml +21 -0
- package/{examples/manifests/cloud-metadata.yml → manifests/plugins/cloud-metadata/success.yml} +2 -1
- package/manifests/plugins/coefficient/failure-invalid-config-input-param.yml +24 -0
- package/{examples/manifests/coefficient.yml → manifests/plugins/coefficient/success.yml} +2 -1
- package/manifests/plugins/divide/failure-invalid-config-denominator.yml +39 -0
- package/manifests/plugins/divide/success.yml +39 -0
- package/manifests/plugins/groupby/failure-invalid-config-group.yml +47 -0
- package/{examples/manifests/group-by.yml → manifests/plugins/groupby/success.yml} +3 -2
- package/manifests/plugins/mock-observations/failure-invalid-config-cpu-range.yml +34 -0
- package/{examples/manifests/mock-observation.yml → manifests/plugins/mock-observations/success.yml} +2 -1
- package/manifests/plugins/multiply/failure-input-parameter-is-missing.yml +24 -0
- package/{examples/manifests/multiply.yml → manifests/plugins/multiply/success.yml} +3 -2
- package/manifests/plugins/regex/failure-missing-input-param.yml +24 -0
- package/{examples/manifests/regex.yml → manifests/plugins/regex/success.yml} +3 -2
- package/manifests/plugins/sci/failure-invalid-config-value.yml +28 -0
- package/{examples/manifests/sci.yml → manifests/plugins/sci/success.yml} +3 -2
- package/manifests/plugins/sci-m/failure-invalid-default-emission-value.yml +24 -0
- package/{examples/manifests/sci-m.yml → manifests/plugins/sci-m/success.yml} +2 -1
- package/manifests/plugins/shell/failure-invalid-command.yml +21 -0
- package/{examples/manifests/shell.yml → manifests/plugins/shell/success.yml} +3 -2
- package/manifests/plugins/sum/failure-missing-input-param.yml +24 -0
- package/{examples/manifests/sum.yml → manifests/plugins/sum/success.yml} +3 -2
- package/manifests/plugins/tdp-finder/failure-missing-input-param.yml +18 -0
- package/{examples/manifests/tdp-finder.yml → manifests/plugins/tdp-finder/success.yml} +2 -1
- package/manifests/plugins/time-sync/failure-config-start-later-end.yml +34 -0
- package/{examples/manifests/time-sync.yml → manifests/plugins/time-sync/success.yml} +4 -2
- package/package.json +4 -2
- package/examples/manifests/azure-importer.yml +0 -24
- package/examples/manifests/basic-demo.yml +0 -70
- package/examples/manifests/boavizta-cloud.yml +0 -20
- package/examples/manifests/boavizta.yml +0 -26
- package/examples/manifests/ccf.yml +0 -20
- package/examples/manifests/cloud-metadata-teads.yml +0 -41
- package/examples/manifests/co2js.yml +0 -30
- package/examples/manifests/csv-export.yml +0 -34
- package/examples/manifests/e-mem.yml +0 -21
- package/examples/manifests/e-net.yml +0 -22
- package/examples/manifests/nesting-demo.yml +0 -89
- package/examples/manifests/pipeline-demo-1.yml +0 -85
- package/examples/manifests/pipeline-with-generics.yml +0 -152
- package/examples/manifests/sci-e.yml +0 -19
- package/examples/manifests/sci-o.yml +0 -26
- package/examples/manifests/teads-curve.yml +0 -20
- package/examples/manifests/watt-time.yml +0 -35
- /package/{examples/manifests/divide.yml → manifests/integrations/cloud-metadata-divide-boavizta.yml} +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: initialize-error-no-path
|
|
2
|
+
description: a negative test case that fails because the path is mising in a plugin initialization
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
teads-curve:
|
|
7
|
+
path:
|
|
8
|
+
method: TeadsCurve
|
|
9
|
+
global-config:
|
|
10
|
+
interpolation: spline
|
|
11
|
+
outputs: ['yaml']
|
|
12
|
+
tree:
|
|
13
|
+
children:
|
|
14
|
+
child-0:
|
|
15
|
+
defaults:
|
|
16
|
+
cpu/thermal-design-power: 100
|
|
17
|
+
pipeline:
|
|
18
|
+
- teads-curve
|
|
19
|
+
inputs:
|
|
20
|
+
- timestamp: 2023-07-06T00:00
|
|
21
|
+
duration: 1
|
|
22
|
+
cpu/utilization: 20
|
|
23
|
+
- timestamp: 2023-07-06T00:01
|
|
24
|
+
duration: 1
|
|
25
|
+
cpu/utilization: 80
|
|
26
|
+
- timestamp: 2023-07-06T00:02
|
|
27
|
+
duration: 1
|
|
28
|
+
cpu/utilization: 20
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: initialize-error-no-path
|
|
2
|
+
description: a negative test case that fails becuase no plugins are included in the initialize block
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
outputs: ['yaml']
|
|
7
|
+
tree:
|
|
8
|
+
children:
|
|
9
|
+
child-0:
|
|
10
|
+
defaults:
|
|
11
|
+
cpu/thermal-design-power: 100
|
|
12
|
+
pipeline:
|
|
13
|
+
- teads-curve
|
|
14
|
+
inputs:
|
|
15
|
+
- timestamp: 2023-07-06T00:00
|
|
16
|
+
duration: 1
|
|
17
|
+
cpu/utilization: 20
|
|
18
|
+
- timestamp: 2023-07-06T00:01
|
|
19
|
+
duration: 1
|
|
20
|
+
cpu/utilization: 80
|
|
21
|
+
- timestamp: 2023-07-06T00:02
|
|
22
|
+
duration: 1
|
|
23
|
+
cpu/utilization: 20
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: input-error-missing-duration
|
|
2
|
+
description: a negative test case that fails due to the required `duration` field being omitted from input data
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
teads-curve:
|
|
7
|
+
path: '@grnsft/if-unofficial-plugins'
|
|
8
|
+
method: TeadsCurve
|
|
9
|
+
global-config:
|
|
10
|
+
interpolation: spline
|
|
11
|
+
outputs: ['yaml']
|
|
12
|
+
tree:
|
|
13
|
+
children:
|
|
14
|
+
child-0:
|
|
15
|
+
defaults:
|
|
16
|
+
cpu/thermal-design-power: 100
|
|
17
|
+
pipeline:
|
|
18
|
+
- teads-curve
|
|
19
|
+
inputs:
|
|
20
|
+
- timestamp: 2023-07-06T00:00
|
|
21
|
+
cpu/utilization: 20
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: pipeline-error-naming-mismatch
|
|
2
|
+
description: a negative test case that fails due to the plugin name in the pipeline not matching the name given in initialize
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
teads-curve:
|
|
7
|
+
path: '@grnsft/if-unofficial-plugins'
|
|
8
|
+
method: TeadsCurve
|
|
9
|
+
global-config:
|
|
10
|
+
interpolation: spline
|
|
11
|
+
outputs: ['yaml']
|
|
12
|
+
tree:
|
|
13
|
+
children:
|
|
14
|
+
child-0:
|
|
15
|
+
defaults:
|
|
16
|
+
cpu/thermal-design-power: 100
|
|
17
|
+
pipeline:
|
|
18
|
+
- wrong-name
|
|
19
|
+
inputs:
|
|
20
|
+
- timestamp: 2023-07-06T00:00
|
|
21
|
+
duration: 1
|
|
22
|
+
cpu/utilization: 20
|
|
23
|
+
- timestamp: 2023-07-06T00:01
|
|
24
|
+
duration: 1
|
|
25
|
+
cpu/utilization: 80
|
|
26
|
+
- timestamp: 2023-07-06T00:02
|
|
27
|
+
duration: 1
|
|
28
|
+
cpu/utilization: 20
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: pipeline-uninitialized-plugin-error
|
|
2
|
+
description: a negative test case that fails due to an uninitialized plugin being invoked in a pipeline
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
teads-curve:
|
|
7
|
+
path: '@grnsft/if-unofficial-plugins'
|
|
8
|
+
method: TeadsCurve
|
|
9
|
+
global-config:
|
|
10
|
+
interpolation: spline
|
|
11
|
+
outputs: ['yaml']
|
|
12
|
+
tree:
|
|
13
|
+
children:
|
|
14
|
+
child-0:
|
|
15
|
+
defaults:
|
|
16
|
+
cpu/thermal-design-power: 100
|
|
17
|
+
pipeline:
|
|
18
|
+
- teads-curve
|
|
19
|
+
- multiply
|
|
20
|
+
inputs:
|
|
21
|
+
- timestamp: 2023-07-06T00:00
|
|
22
|
+
duration: 1
|
|
23
|
+
cpu/utilization: 20
|
|
24
|
+
- timestamp: 2023-07-06T00:01
|
|
25
|
+
duration: 1
|
|
26
|
+
cpu/utilization: 80
|
|
27
|
+
- timestamp: 2023-07-06T00:02
|
|
28
|
+
duration: 1
|
|
29
|
+
cpu/utilization: 20
|
package/{examples/manifests/boavizta-pipeline.yml → manifests/bugs/pipeline-ordering-error.yml}
RENAMED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
name:
|
|
2
|
-
description:
|
|
1
|
+
name: pipeline-ordering-error
|
|
2
|
+
description: a negative test case that fails because sci-o is invoked too early in the pipeline (before its inputs are generated)
|
|
3
3
|
tags:
|
|
4
4
|
initialize:
|
|
5
5
|
plugins:
|
|
6
|
-
|
|
7
|
-
method: BoaviztaCpuOutput
|
|
6
|
+
"teads-curve":
|
|
8
7
|
path: "@grnsft/if-unofficial-plugins"
|
|
8
|
+
method: TeadsCurve
|
|
9
9
|
global-config:
|
|
10
|
-
|
|
11
|
-
verbose: true
|
|
10
|
+
interpolation: spline
|
|
12
11
|
"sum":
|
|
13
12
|
path: "@grnsft/if-plugins"
|
|
14
13
|
method: Sum
|
|
@@ -41,10 +40,10 @@ tree:
|
|
|
41
40
|
children:
|
|
42
41
|
child-1:
|
|
43
42
|
pipeline:
|
|
44
|
-
-
|
|
43
|
+
- teads-curve
|
|
44
|
+
- sci-o
|
|
45
45
|
- sum
|
|
46
46
|
- sci-m
|
|
47
|
-
- sci-o
|
|
48
47
|
- time-sync
|
|
49
48
|
- sci
|
|
50
49
|
config:
|
|
@@ -56,8 +55,6 @@ tree:
|
|
|
56
55
|
device/expected-lifespan: 94608000 # 3 years in seconds
|
|
57
56
|
resources-reserved: 1
|
|
58
57
|
resources-total: 8
|
|
59
|
-
cpu/number-cores: 24
|
|
60
|
-
cpu/name: Intel® Core™ i7-1185G7
|
|
61
58
|
inputs:
|
|
62
59
|
- timestamp: "2023-12-12T00:00:00.000Z"
|
|
63
60
|
cloud/instance-type: A1
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
name: basic
|
|
2
|
-
description:
|
|
1
|
+
name: basic
|
|
2
|
+
description: a minimal manifest executing a single plugin on a single component for a single timestep
|
|
3
3
|
tags:
|
|
4
4
|
initialize:
|
|
5
5
|
plugins:
|
|
@@ -8,6 +8,7 @@ initialize:
|
|
|
8
8
|
method: TeadsCurve
|
|
9
9
|
global-config:
|
|
10
10
|
interpolation: spline
|
|
11
|
+
outputs: ['yaml']
|
|
11
12
|
tree:
|
|
12
13
|
children:
|
|
13
14
|
child-0:
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
name:
|
|
2
|
-
description:
|
|
3
|
-
# aggregation:
|
|
4
|
-
# metrics:
|
|
5
|
-
# - 'carbon'
|
|
6
|
-
# type: 'both'
|
|
1
|
+
name: mock-cpu-util-to-carbon
|
|
2
|
+
description: a complete pipeline that starts with mocked CPU utilization data and outputs operational carbon in gCO2eq
|
|
7
3
|
initialize:
|
|
8
|
-
outputs: ['yaml'
|
|
4
|
+
outputs: ['yaml']
|
|
9
5
|
plugins:
|
|
10
6
|
group-by:
|
|
11
7
|
path: 'builtin'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
name: nesting
|
|
2
|
-
description:
|
|
1
|
+
name: nesting
|
|
2
|
+
description: a manifest that includes nested child components
|
|
3
3
|
tags:
|
|
4
4
|
kind: web
|
|
5
5
|
complexity: moderate
|
|
@@ -11,6 +11,7 @@ aggregation:
|
|
|
11
11
|
type: "both"
|
|
12
12
|
params:
|
|
13
13
|
initialize:
|
|
14
|
+
outputs: ['yaml']
|
|
14
15
|
plugins:
|
|
15
16
|
teads-curve:
|
|
16
17
|
path: "@grnsft/if-unofficial-plugins"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
name: pipeline-with-
|
|
2
|
-
description:
|
|
1
|
+
name: pipeline-with-mocks
|
|
2
|
+
description: a full pipeline seeded with data from mock-observations feature
|
|
3
3
|
tags:
|
|
4
4
|
aggregation:
|
|
5
5
|
metrics:
|
|
@@ -56,6 +56,7 @@ initialize:
|
|
|
56
56
|
"group-by":
|
|
57
57
|
path: builtin
|
|
58
58
|
method: GroupBy
|
|
59
|
+
outputs: ['yaml']
|
|
59
60
|
tree:
|
|
60
61
|
children:
|
|
61
62
|
child-1:
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Aggregation
|
|
2
|
+
description: Apply `horizontal` aggregation
|
|
3
|
+
aggregation:
|
|
4
|
+
metrics:
|
|
5
|
+
- 'cpu/utilization'
|
|
6
|
+
type: 'horizontal'
|
|
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
|
|
44
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Aggregation
|
|
2
|
+
description: Apply `vertical` aggregation
|
|
3
|
+
aggregation:
|
|
4
|
+
metrics:
|
|
5
|
+
- 'cpu/utilization'
|
|
6
|
+
type: 'vertical'
|
|
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
|
|
44
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
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-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
|
|
44
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Mock observations + Group by
|
|
2
|
+
description: Integration of `mock observations` + `groupby plugins`
|
|
3
|
+
initialize:
|
|
4
|
+
plugins:
|
|
5
|
+
mock-observations:
|
|
6
|
+
path: '@grnsft/if-plugins'
|
|
7
|
+
method: MockObservations
|
|
8
|
+
global-config:
|
|
9
|
+
timestamp-from: '2024-03-05T00:00:00.000Z'
|
|
10
|
+
timestamp-to: '2024-03-05T00:01:00.000Z'
|
|
11
|
+
duration: 10
|
|
12
|
+
components:
|
|
13
|
+
- name: server-1
|
|
14
|
+
cloud/instance-type: Standard_E64_v3
|
|
15
|
+
cloud/region: westus3
|
|
16
|
+
- name: server-2
|
|
17
|
+
cloud/instance-type: Standard_E64_v3
|
|
18
|
+
cloud/region: france
|
|
19
|
+
generators:
|
|
20
|
+
common:
|
|
21
|
+
cloud/vendor: azure
|
|
22
|
+
randint:
|
|
23
|
+
cpu/utilization:
|
|
24
|
+
min: 1
|
|
25
|
+
max: 99
|
|
26
|
+
group-by:
|
|
27
|
+
path: 'builtin'
|
|
28
|
+
method: GroupBy
|
|
29
|
+
tree:
|
|
30
|
+
pipeline:
|
|
31
|
+
- mock-observations
|
|
32
|
+
- group-by
|
|
33
|
+
defaults:
|
|
34
|
+
config:
|
|
35
|
+
group-by:
|
|
36
|
+
group:
|
|
37
|
+
- cloud/region
|
|
38
|
+
- name
|
|
39
|
+
inputs: null
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: Mock observation and time sync integration
|
|
2
|
+
description: Integration of `mock observation` + `time sync`
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
plugins:
|
|
6
|
+
mock-observations:
|
|
7
|
+
kind: plugin
|
|
8
|
+
method: MockObservations
|
|
9
|
+
path: "@grnsft/if-plugins"
|
|
10
|
+
global-config:
|
|
11
|
+
timestamp-from: 2023-07-06T00:00
|
|
12
|
+
timestamp-to: 2023-07-06T00:10
|
|
13
|
+
duration: 60
|
|
14
|
+
components:
|
|
15
|
+
- cloud/instance-type: A1
|
|
16
|
+
generators:
|
|
17
|
+
common:
|
|
18
|
+
cloud/region: uk-west
|
|
19
|
+
common-key: common-val
|
|
20
|
+
randint:
|
|
21
|
+
cpu/utilization:
|
|
22
|
+
min: 1
|
|
23
|
+
max: 99
|
|
24
|
+
"teads-curve":
|
|
25
|
+
path: "@grnsft/if-unofficial-plugins"
|
|
26
|
+
method: TeadsCurve
|
|
27
|
+
global-config:
|
|
28
|
+
interpolation: spline
|
|
29
|
+
"time-sync":
|
|
30
|
+
method: TimeSync
|
|
31
|
+
path: "builtin"
|
|
32
|
+
global-config:
|
|
33
|
+
start-time: "2023-12-12T00:00:00.000Z"
|
|
34
|
+
end-time: "2023-12-12T00:01:00.000Z"
|
|
35
|
+
interval: 5
|
|
36
|
+
allow-padding: true
|
|
37
|
+
tree:
|
|
38
|
+
children:
|
|
39
|
+
child-1:
|
|
40
|
+
pipeline:
|
|
41
|
+
- teads-curve
|
|
42
|
+
- time-sync
|
|
43
|
+
defaults:
|
|
44
|
+
cpu/thermal-design-power: 100
|
|
45
|
+
inputs:
|
|
46
|
+
- timestamp: "2023-12-12T00:00:00.000Z"
|
|
47
|
+
cloud/instance-type: A1
|
|
48
|
+
cloud/region: uk-west
|
|
49
|
+
duration: 1
|
|
50
|
+
cpu/utilization: 10
|
|
51
|
+
- timestamp: "2023-12-12T00:00:01.000Z"
|
|
52
|
+
duration: 5
|
|
53
|
+
cpu/utilization: 20
|
|
54
|
+
cloud/instance-type: A1
|
|
55
|
+
cloud/region: uk-west
|
|
56
|
+
- timestamp: "2023-12-12T00:00:06.000Z"
|
|
57
|
+
duration: 7
|
|
58
|
+
cpu/utilization: 15
|
|
59
|
+
cloud/instance-type: A1
|
|
60
|
+
cloud/region: uk-west
|
|
61
|
+
- timestamp: "2023-12-12T00:00:13.000Z"
|
|
62
|
+
duration: 30
|
|
63
|
+
cloud/instance-type: A1
|
|
64
|
+
cloud/region: uk-west
|
|
65
|
+
cpu/utilization: 15
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: cloud-metadata
|
|
2
|
+
description: failure with invalid `inputs.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: gcp
|
|
19
|
+
cloud/instance-type: m5n.large
|
|
20
|
+
duration: 100
|
|
21
|
+
cpu/utilization: 10
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: coefficient-demo
|
|
2
|
+
description: failure with ivalid `global-config.input-parameter`
|
|
3
|
+
tags:
|
|
4
|
+
initialize:
|
|
5
|
+
outputs: ['yaml']
|
|
6
|
+
plugins:
|
|
7
|
+
coefficient:
|
|
8
|
+
method: Coefficient
|
|
9
|
+
path: "@grnsft/if-plugins"
|
|
10
|
+
global-config:
|
|
11
|
+
input-parameter: 4
|
|
12
|
+
coefficient: 3
|
|
13
|
+
output-parameter: "carbon-product"
|
|
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,39 @@
|
|
|
1
|
+
name: divide
|
|
2
|
+
description: failure when `global-config.denominator` is string
|
|
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: "@grnsft/if-plugins"
|
|
13
|
+
global-config:
|
|
14
|
+
numerator: vcpus-allocated
|
|
15
|
+
denominator: 'vcpus'
|
|
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: "@grnsft/if-plugins"
|
|
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
|