@grnsft/if 0.1.7 → 0.1.9
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/build/config/config.d.ts +0 -2
- package/build/config/config.js +6 -3
- package/build/config/index.d.ts +1 -0
- package/build/config/index.js +4 -2
- package/build/config/params.d.ts +2 -0
- package/build/config/params.js +146 -0
- package/build/config/strings.d.ts +5 -0
- package/build/config/strings.js +6 -1
- package/build/index.js +48 -18
- package/build/lib/aggregator.d.ts +7 -0
- package/build/lib/aggregator.js +46 -0
- package/build/lib/models-universe.d.ts +5 -1
- package/build/lib/models-universe.js +37 -5
- package/build/lib/supercomputer.d.ts +14 -12
- package/build/lib/supercomputer.js +55 -87
- package/build/models/time-sync.d.ts +8 -5
- package/build/models/time-sync.js +35 -12
- package/build/types/aggregator.d.ts +3 -0
- package/build/types/aggregator.js +5 -0
- package/build/types/impl.d.ts +65 -18
- package/build/types/impl.js +17 -3
- package/build/types/model-interface.d.ts +1 -2
- package/build/types/model-interface.js +1 -1
- package/build/types/models-universe.d.ts +2 -5
- package/build/types/models-universe.js +1 -1
- package/build/types/parameters.d.ts +16 -0
- package/build/types/parameters.js +5 -0
- package/build/types/process-args.d.ts +1 -0
- package/build/types/process-args.js +1 -1
- package/build/types/time-sync.d.ts +1 -0
- package/build/types/time-sync.js +1 -1
- package/build/util/args.d.ts +1 -0
- package/build/util/args.js +27 -3
- package/build/util/param-selectors.d.ts +5 -0
- package/build/util/param-selectors.js +14 -0
- package/build/util/validations.d.ts +11 -5
- package/build/util/validations.js +17 -25
- package/build/util/yaml.js +27 -4
- package/examples/impls/test/aggregation-test.yml +19 -19
- package/examples/impls/test/aggregation-test2.yml +52 -0
- package/examples/impls/test/{azure.yml → azure-importer.yml} +8 -10
- package/examples/impls/test/boavizta.yml +27 -0
- package/examples/impls/test/cim.yml +19 -0
- package/examples/impls/test/e-mem.yml +19 -0
- package/examples/impls/test/if-demo.yml +0 -2
- package/examples/impls/test/large-impl.yml +30031 -30031
- package/examples/impls/test/nesting.yml +93 -42
- package/examples/impls/test/new-params-test.yml +35 -0
- package/examples/impls/test/sci.yml +3 -3
- package/examples/impls/test/shell.yml +5 -5
- package/examples/impls/test/teads-cpu.yml +18 -0
- package/examples/impls/test/time-sync-avoid-padding.yml +50 -0
- package/examples/impls/test/time-sync.yml +14 -13
- package/examples/ompls/aggregation-test2.yml +83 -0
- package/examples/ompls/{azure.yml → azure-importer.yml} +40 -40
- package/examples/ompls/boavizta.yml +32 -0
- package/examples/ompls/cim.yml +29 -0
- package/examples/ompls/e-mem.yml +26 -0
- package/examples/ompls/nesting.yml +91 -85
- package/examples/ompls/sci.yml +6 -5
- package/examples/ompls/shell.yml +7 -7
- package/examples/ompls/teads-cpu.yml +24 -0
- package/jest.config.js +1 -1
- package/package.json +1 -1
- package/src/models/README.md +3 -1
- package/build/config/units.yaml +0 -112
- package/build/lib/planet-aggregator.d.ts +0 -6
- package/build/lib/planet-aggregator.js +0 -35
- package/build/types/helpers.d.ts +0 -1
- package/build/types/helpers.js +0 -3
- package/build/types/planet-aggregator.d.ts +0 -6
- package/build/types/planet-aggregator.js +0 -3
- package/build/types/units-dealer.d.ts +0 -3
- package/build/types/units-dealer.js +0 -3
- package/build/types/units.d.ts +0 -11
- package/build/types/units.js +0 -37
- package/build/util/units-dealer.d.ts +0 -10
- package/build/util/units-dealer.js +0 -32
- package/coverage/clover.xml +0 -396
- package/coverage/coverage-final.json +0 -14
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/config/config.ts.html +0 -256
- package/coverage/lcov-report/config/index.html +0 -146
- package/coverage/lcov-report/config/index.ts.html +0 -91
- package/coverage/lcov-report/config/strings.ts.html +0 -196
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -161
- package/coverage/lcov-report/lib/index.html +0 -161
- package/coverage/lcov-report/lib/models-universe.ts.html +0 -517
- package/coverage/lcov-report/lib/observatory.ts.html +0 -187
- package/coverage/lcov-report/lib/planet-aggregator.ts.html +0 -244
- package/coverage/lcov-report/lib/supercomputer.ts.html +0 -712
- package/coverage/lcov-report/models/index.html +0 -131
- package/coverage/lcov-report/models/index.ts.html +0 -88
- package/coverage/lcov-report/models/time-sync.ts.html +0 -1153
- 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/util/args.ts.html +0 -289
- package/coverage/lcov-report/util/errors.ts.html +0 -166
- package/coverage/lcov-report/util/index.html +0 -161
- package/coverage/lcov-report/util/units-dealer.ts.html +0 -199
- package/coverage/lcov-report/util/yaml.ts.html +0 -193
- package/coverage/lcov.info +0 -666
- package/src/config/units.yaml +0 -112
- package/tsconfig.build.tsbuildinfo +0 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: cloud-instance-metadata
|
|
2
|
+
description: example impl invoking Cloud Instance Metadata model
|
|
3
|
+
tags: null
|
|
4
|
+
initialize:
|
|
5
|
+
models:
|
|
6
|
+
- name: cloud-instance-metadata
|
|
7
|
+
path: "@grnsft/if-models"
|
|
8
|
+
model: CloudInstanceMetadataModel
|
|
9
|
+
graph:
|
|
10
|
+
children:
|
|
11
|
+
child:
|
|
12
|
+
pipeline:
|
|
13
|
+
- cloud-instance-metadata
|
|
14
|
+
config: null
|
|
15
|
+
inputs:
|
|
16
|
+
- timestamp: '2021-01-01T00:00:00Z'
|
|
17
|
+
duration: 5
|
|
18
|
+
cloud-instance-type: m5n.large
|
|
19
|
+
cloud-vendor: aws
|
|
20
|
+
outputs:
|
|
21
|
+
- timestamp: '2021-01-01T00:00:00Z'
|
|
22
|
+
duration: 5
|
|
23
|
+
cloud-instance-type: m5n.large
|
|
24
|
+
cloud-vendor: aws
|
|
25
|
+
vcpus-allocated: 2
|
|
26
|
+
vcpus-total: 96
|
|
27
|
+
memory-available: 8
|
|
28
|
+
physical-processor: Intel® Xeon® Platinum 8259CL
|
|
29
|
+
thermal-design-power: 210
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: e-mem
|
|
2
|
+
description: null
|
|
3
|
+
tags: null
|
|
4
|
+
initialize:
|
|
5
|
+
models:
|
|
6
|
+
- name: e-mem
|
|
7
|
+
path: "@grnsft/if-models"
|
|
8
|
+
model: EMemModel
|
|
9
|
+
graph:
|
|
10
|
+
children:
|
|
11
|
+
child:
|
|
12
|
+
pipeline:
|
|
13
|
+
- e-mem
|
|
14
|
+
config: null
|
|
15
|
+
inputs:
|
|
16
|
+
- timestamp: 2023-08-06T00:00
|
|
17
|
+
duration: 3600
|
|
18
|
+
mem-util: 40
|
|
19
|
+
total-memoryGB: 1
|
|
20
|
+
outputs:
|
|
21
|
+
- timestamp: 2023-08-06T00:00
|
|
22
|
+
duration: 3600
|
|
23
|
+
mem-util: 40
|
|
24
|
+
total-memoryGB: 1
|
|
25
|
+
coefficient: 0.38
|
|
26
|
+
energy-memory: 0.15200000000000002
|
|
@@ -6,102 +6,108 @@ tags:
|
|
|
6
6
|
category: on-premise
|
|
7
7
|
initialize:
|
|
8
8
|
models:
|
|
9
|
-
- name: teads-curve
|
|
10
|
-
kind: builtin
|
|
11
9
|
- name: sci-e
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
path: ''
|
|
15
|
-
- name: sci-m
|
|
16
|
-
kind: builtin
|
|
17
|
-
verbose: false
|
|
18
|
-
path: ''
|
|
19
|
-
- name: sci-o
|
|
20
|
-
kind: builtin
|
|
21
|
-
verbose: false
|
|
22
|
-
path: ''
|
|
23
|
-
- name: sci
|
|
24
|
-
kind: builtin
|
|
25
|
-
verbose: false
|
|
26
|
-
path: ''
|
|
10
|
+
path: '@grnsft/if-models'
|
|
11
|
+
model: SciEModel
|
|
27
12
|
graph:
|
|
28
13
|
children:
|
|
29
|
-
child:
|
|
14
|
+
child-0:
|
|
30
15
|
pipeline:
|
|
31
|
-
- teads-curve
|
|
32
16
|
- sci-e
|
|
33
|
-
- sci-m
|
|
34
|
-
- sci-o
|
|
35
|
-
- sci
|
|
36
|
-
config:
|
|
37
|
-
teads-curve:
|
|
38
|
-
thermal-design-power: 65
|
|
39
|
-
sci-m:
|
|
40
|
-
total-embodied-emissions: 251000
|
|
41
|
-
time-reserved: 3600
|
|
42
|
-
expected-lifespan: 126144000
|
|
43
|
-
resources-reserved: 1
|
|
44
|
-
total-resources: 1
|
|
45
|
-
sci-o:
|
|
46
|
-
grid-carbon-intensity: 457
|
|
47
|
-
sci:
|
|
48
|
-
functional-unit-duration: 1
|
|
49
|
-
functional-duration-time: ''
|
|
50
|
-
functional-unit: requests
|
|
51
17
|
children:
|
|
52
|
-
child-1:
|
|
18
|
+
child-0-1:
|
|
19
|
+
pipeline:
|
|
20
|
+
- sci-e
|
|
21
|
+
config: null
|
|
53
22
|
inputs:
|
|
54
23
|
- timestamp: 2023-07-06T00:00
|
|
55
24
|
duration: 10
|
|
56
25
|
cpu-util: 50
|
|
57
|
-
|
|
58
|
-
requests: 380
|
|
26
|
+
energy-network: 0.000811
|
|
59
27
|
outputs:
|
|
60
28
|
- timestamp: 2023-07-06T00:00
|
|
61
29
|
duration: 10
|
|
62
30
|
cpu-util: 50
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
31
|
+
energy-network: 0.000811
|
|
32
|
+
energy: 0.000811
|
|
33
|
+
child-0-2:
|
|
34
|
+
children:
|
|
35
|
+
child-0-2-1:
|
|
36
|
+
pipeline:
|
|
37
|
+
- sci-e
|
|
38
|
+
config: null
|
|
39
|
+
inputs:
|
|
40
|
+
- timestamp: 2023-07-06T00:00
|
|
41
|
+
duration: 10
|
|
42
|
+
cpu-util: 50
|
|
43
|
+
energy-network: 0.000811
|
|
44
|
+
outputs:
|
|
45
|
+
- timestamp: 2023-07-06T00:00
|
|
46
|
+
duration: 10
|
|
47
|
+
cpu-util: 50
|
|
48
|
+
energy-network: 0.000811
|
|
49
|
+
energy: 0.000811
|
|
50
|
+
child-0-2-2:
|
|
51
|
+
children:
|
|
52
|
+
child-1-2-1:
|
|
53
|
+
pipeline:
|
|
54
|
+
- sci-e
|
|
55
|
+
config: null
|
|
56
|
+
inputs:
|
|
57
|
+
- timestamp: 2023-07-06T00:00
|
|
58
|
+
duration: 10
|
|
59
|
+
cpu-util: 50
|
|
60
|
+
energy-network: 0.000811
|
|
61
|
+
outputs:
|
|
62
|
+
- timestamp: 2023-07-06T00:00
|
|
63
|
+
duration: 10
|
|
64
|
+
cpu-util: 50
|
|
65
|
+
energy-network: 0.000811
|
|
66
|
+
energy: 0.000811
|
|
67
|
+
child-1-2-2:
|
|
68
|
+
children:
|
|
69
|
+
child-1-2-2-1:
|
|
70
|
+
pipeline:
|
|
71
|
+
- sci-e
|
|
72
|
+
config: null
|
|
73
|
+
inputs:
|
|
74
|
+
- timestamp: 2023-07-06T00:00
|
|
75
|
+
duration: 10
|
|
76
|
+
cpu-util: 50
|
|
77
|
+
energy-network: 0.000811
|
|
78
|
+
outputs:
|
|
79
|
+
- timestamp: 2023-07-06T00:00
|
|
80
|
+
duration: 10
|
|
81
|
+
cpu-util: 50
|
|
82
|
+
energy-network: 0.000811
|
|
83
|
+
energy: 0.000811
|
|
84
|
+
child-1-2-2-2:
|
|
85
|
+
pipeline:
|
|
86
|
+
- sci-e
|
|
87
|
+
config: null
|
|
88
|
+
inputs:
|
|
89
|
+
- timestamp: 2023-07-06T00:00
|
|
90
|
+
duration: 10
|
|
91
|
+
cpu-util: 50
|
|
92
|
+
energy-network: 0.000811
|
|
93
|
+
outputs:
|
|
94
|
+
- timestamp: 2023-07-06T00:00
|
|
95
|
+
duration: 10
|
|
96
|
+
cpu-util: 50
|
|
97
|
+
energy-network: 0.000811
|
|
98
|
+
energy: 0.000811
|
|
99
|
+
child-1-2-2-3:
|
|
100
|
+
pipeline:
|
|
101
|
+
- sci-e
|
|
102
|
+
config: null
|
|
103
|
+
inputs:
|
|
104
|
+
- timestamp: 2023-07-06T00:00
|
|
105
|
+
duration: 10
|
|
106
|
+
cpu-util: 50
|
|
107
|
+
energy-network: 0.000811
|
|
108
|
+
outputs:
|
|
109
|
+
- timestamp: 2023-07-06T00:00
|
|
110
|
+
duration: 10
|
|
111
|
+
cpu-util: 50
|
|
112
|
+
energy-network: 0.000811
|
|
113
|
+
energy: 0.000811
|
package/examples/ompls/sci.yml
CHANGED
|
@@ -4,8 +4,9 @@ tags: null
|
|
|
4
4
|
initialize:
|
|
5
5
|
models:
|
|
6
6
|
- name: sci
|
|
7
|
-
kind:
|
|
8
|
-
path:
|
|
7
|
+
kind: plugin
|
|
8
|
+
path: "@grnsft/if-models"
|
|
9
|
+
model: SciModel
|
|
9
10
|
graph:
|
|
10
11
|
children:
|
|
11
12
|
child:
|
|
@@ -13,8 +14,7 @@ graph:
|
|
|
13
14
|
- sci
|
|
14
15
|
config:
|
|
15
16
|
sci:
|
|
16
|
-
functional-unit-
|
|
17
|
-
functional-unit-time: minutes
|
|
17
|
+
functional-unit-time: 1 minute
|
|
18
18
|
functional-unit: requests
|
|
19
19
|
inputs:
|
|
20
20
|
- timestamp: 2023-07-06T00:00
|
|
@@ -31,6 +31,7 @@ graph:
|
|
|
31
31
|
embodied-carbon: 0.02
|
|
32
32
|
requests: 100
|
|
33
33
|
functional-unit-duration: 1
|
|
34
|
-
functional-unit-time:
|
|
34
|
+
functional-unit-time: 1 minute
|
|
35
35
|
functional-unit: requests
|
|
36
|
+
carbon: 0.0013944444444444442
|
|
36
37
|
sci: 0.0008366666666666665
|
package/examples/ompls/shell.yml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
name:
|
|
2
|
-
description: example impl invoking
|
|
1
|
+
name: shell-demo
|
|
2
|
+
description: example impl invoking shell model
|
|
3
3
|
tags: null
|
|
4
4
|
initialize:
|
|
5
5
|
models:
|
|
@@ -12,12 +12,12 @@ graph:
|
|
|
12
12
|
- sampler
|
|
13
13
|
config:
|
|
14
14
|
sampler:
|
|
15
|
-
|
|
15
|
+
command: python3 /usr/local/bin/sampler
|
|
16
16
|
inputs:
|
|
17
|
-
- timestamp:
|
|
17
|
+
- timestamp: "2023-11-02T10:35:31.820Z"
|
|
18
18
|
duration: 3600
|
|
19
19
|
outputs:
|
|
20
|
-
-
|
|
20
|
+
- timestamp: "2023-11-02T10:35:31.820Z"
|
|
21
|
+
duration: 3600
|
|
21
22
|
energy: 1
|
|
22
|
-
|
|
23
|
-
timestamp: '2023-11-02T10:35:31.820Z'
|
|
23
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: teads-cpu
|
|
2
|
+
description: simple demo invoking teads-cpu
|
|
3
|
+
tags: null
|
|
4
|
+
initialize:
|
|
5
|
+
models:
|
|
6
|
+
- name: teads-cpu
|
|
7
|
+
path: '@grnsft/if-unofficial-models'
|
|
8
|
+
model: TeadsCurveModel
|
|
9
|
+
graph:
|
|
10
|
+
children:
|
|
11
|
+
child:
|
|
12
|
+
pipeline:
|
|
13
|
+
- teads-cpu
|
|
14
|
+
inputs:
|
|
15
|
+
- timestamp: 2023-07-06T00:00
|
|
16
|
+
duration: 3600
|
|
17
|
+
cpu-util: 50
|
|
18
|
+
thermal-design-power: 300
|
|
19
|
+
outputs:
|
|
20
|
+
- timestamp: 2023-07-06T00:00
|
|
21
|
+
duration: 3600
|
|
22
|
+
cpu-util: 50
|
|
23
|
+
thermal-design-power: 300
|
|
24
|
+
energy-cpu: 0.225
|
package/jest.config.js
CHANGED
package/package.json
CHANGED
package/src/models/README.md
CHANGED
|
@@ -10,6 +10,7 @@ The following should be defined in the model initialization:
|
|
|
10
10
|
- `start-time`: global start time as ISO 8061 string
|
|
11
11
|
- `stop`: global end time as ISO 8061 string
|
|
12
12
|
- `interval`: temporal resolution in seconds
|
|
13
|
+
- `error-on-padding`: avoid zero/'zeroish' padding (if needed) and error out instead. `False` by defult.
|
|
13
14
|
|
|
14
15
|
### Inputs:
|
|
15
16
|
|
|
@@ -114,6 +115,7 @@ The end result of this gap-filling is that we have continuous 1 second resolutio
|
|
|
114
115
|
{timestamp: 2023-12-12T00:00:09.000Z, duration: 1, cpu-util: 12, carbon: 2.5, energy: 5, grid-carbon-intensity: 471}
|
|
115
116
|
]
|
|
116
117
|
```
|
|
118
|
+
Note that when `error-on-padding` is `true` no gap-filling is performed and the model will error out instead.
|
|
117
119
|
|
|
118
120
|
#### Trimming and padding
|
|
119
121
|
|
|
@@ -149,7 +151,7 @@ For example, for `startTime = 2023-12-12T00:00:00.000Z` and `endTime = 2023-12-1
|
|
|
149
151
|
|
|
150
152
|
]
|
|
151
153
|
```
|
|
152
|
-
|
|
154
|
+
Note that when `error-on-padding` is `true` no padding is performed and the model will error out instead.
|
|
153
155
|
|
|
154
156
|
#### Resampling rules
|
|
155
157
|
|
package/build/config/units.yaml
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
carbon:
|
|
2
|
-
description: an amount of carbon emitted into the atmosphere
|
|
3
|
-
unit: gCO2e
|
|
4
|
-
aggregation: sum
|
|
5
|
-
core-units:
|
|
6
|
-
description: number of cores available
|
|
7
|
-
unit: cores
|
|
8
|
-
aggregation: none
|
|
9
|
-
cpu-util:
|
|
10
|
-
description: refers to CPU utilization.
|
|
11
|
-
unit: percentage
|
|
12
|
-
aggregation: avg
|
|
13
|
-
disk-io:
|
|
14
|
-
description: refers to GB of data written/read from disk
|
|
15
|
-
unit: GB
|
|
16
|
-
aggregation: sum
|
|
17
|
-
duration:
|
|
18
|
-
description: refers to the duration of the input
|
|
19
|
-
unit: seconds
|
|
20
|
-
aggregation: sum
|
|
21
|
-
energy:
|
|
22
|
-
description: amount of energy utilised by the component
|
|
23
|
-
unit: kWh
|
|
24
|
-
aggregation: sum
|
|
25
|
-
energy-cpu:
|
|
26
|
-
description: Energy consumed by the CPU of the component
|
|
27
|
-
unit: kWh
|
|
28
|
-
aggregation: sum
|
|
29
|
-
expected-lifespan:
|
|
30
|
-
description: Total Expected Lifespan of the Component in Seconds
|
|
31
|
-
unit: seconds
|
|
32
|
-
aggregation: sum
|
|
33
|
-
energy-memory:
|
|
34
|
-
description: Energy consumed by the Memory of the component
|
|
35
|
-
unit: kWh
|
|
36
|
-
aggregation: sum
|
|
37
|
-
embodied-carbon:
|
|
38
|
-
description: Embodied Emissions of the component
|
|
39
|
-
unit: gCO2e
|
|
40
|
-
aggregation: sum
|
|
41
|
-
energy-network:
|
|
42
|
-
description: Energy consumed by the Network of the component
|
|
43
|
-
unit: kWh
|
|
44
|
-
aggregation: sum
|
|
45
|
-
functional-unit:
|
|
46
|
-
description: the name of the functional unit in which the final SCI value should be expressed, e.g. requests, users
|
|
47
|
-
unit: none
|
|
48
|
-
aggregation: sum
|
|
49
|
-
functional-unit-time:
|
|
50
|
-
description: string describing the unit of time in which the final SCI calculation should be expressed, e.g. "1-min"
|
|
51
|
-
unit: none
|
|
52
|
-
aggregation: none
|
|
53
|
-
gpu-util:
|
|
54
|
-
description: refers to CPU utilization.
|
|
55
|
-
unit: percentage
|
|
56
|
-
aggregation: avg
|
|
57
|
-
grid-carbon-intensity:
|
|
58
|
-
description: Carbon intensity for the grid
|
|
59
|
-
unit: gCO2eq/kWh
|
|
60
|
-
aggregation: avg
|
|
61
|
-
instance-type:
|
|
62
|
-
description: Type of Cloud Instance name used in the cloud provider APIs
|
|
63
|
-
unit: None
|
|
64
|
-
aggregation: None
|
|
65
|
-
location:
|
|
66
|
-
description: Geographic location of provider as string (for watt-time model it is provided as latitude and longitude, comma separated, in decimal degrees)
|
|
67
|
-
unit: None (decimal degrees for watt-time model)
|
|
68
|
-
aggregation: None
|
|
69
|
-
operational-carbon:
|
|
70
|
-
description: Operational Emissions of the component
|
|
71
|
-
unit: gCO2e
|
|
72
|
-
aggregation: sum
|
|
73
|
-
physical-processor:
|
|
74
|
-
description: Name of the physical processor
|
|
75
|
-
unit: None
|
|
76
|
-
aggregation: none
|
|
77
|
-
vendor:
|
|
78
|
-
description: Name of the cloud service provider in the ccf model. Can be aws, gcp or azure
|
|
79
|
-
unit: None
|
|
80
|
-
aggregation: none
|
|
81
|
-
ram-alloc:
|
|
82
|
-
description: refers to GB of memory allocated.
|
|
83
|
-
unit: GB
|
|
84
|
-
aggregation: avg
|
|
85
|
-
ram-util:
|
|
86
|
-
description: refers to percentage of memory utilized.
|
|
87
|
-
unit: percentage
|
|
88
|
-
aggregation: avg
|
|
89
|
-
resources-reserved:
|
|
90
|
-
description: resources reserved for an application
|
|
91
|
-
unit: count
|
|
92
|
-
aggregation: none
|
|
93
|
-
thermal-design-power:
|
|
94
|
-
description: thermal design power for a processor
|
|
95
|
-
unit: kwh
|
|
96
|
-
aggregation: avg
|
|
97
|
-
total-embodied-emissions:
|
|
98
|
-
description: total embodied emissions of some component
|
|
99
|
-
unit: gCO2e
|
|
100
|
-
aggregation: sum
|
|
101
|
-
timestamp:
|
|
102
|
-
description: refers to the time of occurrence of the input
|
|
103
|
-
unit: RFC3339
|
|
104
|
-
aggregation: none
|
|
105
|
-
time-reserved:
|
|
106
|
-
description: time reserved for a component
|
|
107
|
-
unit: seconds
|
|
108
|
-
aggregation: none
|
|
109
|
-
total-resources:
|
|
110
|
-
description: total resources available
|
|
111
|
-
unit: count
|
|
112
|
-
aggregation: none
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AggregationResult, PlanetAggregatorParams } from '../types/planet-aggregator';
|
|
2
|
-
import { ModelParams } from '../types/model-interface';
|
|
3
|
-
/**
|
|
4
|
-
* Aggregates child node level metrics. Uses provided aggregation `params`.
|
|
5
|
-
*/
|
|
6
|
-
export declare const planetAggregator: (inputs: ModelParams[], params: PlanetAggregatorParams) => AggregationResult;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.planetAggregator = void 0;
|
|
4
|
-
const errors_1 = require("../util/errors");
|
|
5
|
-
const { InvalidAggregationParams } = errors_1.ERRORS;
|
|
6
|
-
/**
|
|
7
|
-
* Aggregates child node level metrics. Uses provided aggregation `params`.
|
|
8
|
-
*/
|
|
9
|
-
const planetAggregator = (inputs, params) => {
|
|
10
|
-
if (!params['aggregation-metrics'] ||
|
|
11
|
-
params['aggregation-metrics'].length === 0) {
|
|
12
|
-
throw new InvalidAggregationParams('Provided aggregation metrics are invalid. Please provide an array of strings.');
|
|
13
|
-
}
|
|
14
|
-
const aggregationMetrics = params['aggregation-metrics'];
|
|
15
|
-
const aggregationMethod = params['aggregation-method'];
|
|
16
|
-
return inputs.reduce((acc, input, index) => {
|
|
17
|
-
for (const metric of aggregationMetrics) {
|
|
18
|
-
if (!(metric in input)) {
|
|
19
|
-
throw new InvalidAggregationParams(`Aggregation metric ${metric} is not found in inputs[${index}].`);
|
|
20
|
-
}
|
|
21
|
-
const accessKey = `aggregated-${metric}`;
|
|
22
|
-
const value = parseFloat(input[metric]);
|
|
23
|
-
acc[accessKey] = acc[accessKey] ?? 0;
|
|
24
|
-
acc[accessKey] += value;
|
|
25
|
-
if (index === inputs.length - 1) {
|
|
26
|
-
if (aggregationMethod === 'avg') {
|
|
27
|
-
acc[accessKey] /= inputs.length;
|
|
28
|
-
}
|
|
29
|
-
}
|
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bJHtpbmRleH1dLmBcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgYWNjZXNzS2V5ID0gYGFnZ3JlZ2F0ZWQtJHttZXRyaWN9YDtcbiAgICAgIGNvbnN0IHZhbHVlID0gcGFyc2VGbG9hdChpbnB1dFttZXRyaWNdKTtcbiAgICAgIGFjY1thY2Nlc3NLZXldID0gYWNjW2FjY2Vzc0tleV0gPz8gMDtcbiAgICAgIGFjY1thY2Nlc3NLZXldICs9IHZhbHVlO1xuXG4gICAgICBpZiAoaW5kZXggPT09IGlucHV0cy5sZW5ndGggLSAxKSB7XG4gICAgICAgIGlmIChhZ2dyZWdhdGlvbk1ldGhvZCA9PT0gJ2F2ZycpIHtcbiAgICAgICAgICBhY2NbYWNjZXNzS2V5XSAvPSBpbnB1dHMubGVuZ3RoO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIGFjYztcbiAgfSwge30gYXMgQWdncmVnYXRpb25SZXN1bHQpO1xufTtcbiJdfQ==
|
package/build/types/helpers.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (...args: any) => Promise<infer R> ? R : any;
|
package/build/types/helpers.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90eXBlcy9oZWxwZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSBBc3luY1JldHVyblR5cGU8VCBleHRlbmRzICguLi5hcmdzOiBhbnkpID0+IFByb21pc2U8YW55Pj4gPVxuICBUIGV4dGVuZHMgKC4uLmFyZ3M6IGFueSkgPT4gUHJvbWlzZTxpbmZlciBSPiA/IFIgOiBhbnk7XG4iXX0=
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhbmV0LWFnZ3JlZ2F0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvcGxhbmV0LWFnZ3JlZ2F0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7QWdncmVnYXRpb25NZXRob2QsIEFnZ3JlZ2F0aW9uTWV0cmljc30gZnJvbSAnLi9pbXBsJztcblxuZXhwb3J0IHR5cGUgUGxhbmV0QWdncmVnYXRvclBhcmFtcyA9IHtcbiAgJ2FnZ3JlZ2F0aW9uLW1ldHJpY3MnOiBBZ2dyZWdhdGlvbk1ldHJpY3NbXTtcbiAgJ2FnZ3JlZ2F0aW9uLW1ldGhvZCc6IEFnZ3JlZ2F0aW9uTWV0aG9kO1xufTtcblxuZXhwb3J0IHR5cGUgQWdncmVnYXRpb25SZXN1bHQgPSBSZWNvcmQ8c3RyaW5nLCBudW1iZXI+O1xuIl19
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW5pdHMtZGVhbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3R5cGVzL3VuaXRzLWRlYWxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtBc3luY1JldHVyblR5cGV9IGZyb20gJy4vaGVscGVycyc7XG5cbmltcG9ydCB7VW5pdHNEZWFsZXJ9IGZyb20gJy4uL3V0aWwvdW5pdHMtZGVhbGVyJztcblxuZXhwb3J0IHR5cGUgVW5pdHNEZWFsZXJVc2FnZSA9IEFzeW5jUmV0dXJuVHlwZTx0eXBlb2YgVW5pdHNEZWFsZXI+O1xuIl19
|
package/build/types/units.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const UnitKeys: readonly ["carbon", "core-units", "cpu-util", "disk-io", "duration", "energy-cpu", "expected-lifespan", "energy-memory", "embodied-carbon", "energy", "energy-network", "expected-lifespan", "functional-unit", "functional-unit-duration", "functional-unit-time", "gpu-util", "grid-carbon-intensity", "instance-type", "location", "embodied-carbon", "operational-carbon", "physical-processor", "vendor", "ram-alloc", "ram-util", "resources-reserved", "thermal-design-power", "total-embodied-emissions", "timestamp", "time-reserved", "total-resources"];
|
|
2
|
-
type UnitFields = {
|
|
3
|
-
description: string;
|
|
4
|
-
unit: string;
|
|
5
|
-
aggregation: 'sum' | 'none' | 'avg';
|
|
6
|
-
};
|
|
7
|
-
export type UnitKeyName = (typeof UnitKeys)[number];
|
|
8
|
-
export type Units = {
|
|
9
|
-
[K in UnitKeyName]: UnitFields;
|
|
10
|
-
};
|
|
11
|
-
export {};
|
package/build/types/units.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UnitKeys = void 0;
|
|
4
|
-
exports.UnitKeys = [
|
|
5
|
-
'carbon',
|
|
6
|
-
'core-units',
|
|
7
|
-
'cpu-util',
|
|
8
|
-
'disk-io',
|
|
9
|
-
'duration',
|
|
10
|
-
'energy-cpu',
|
|
11
|
-
'expected-lifespan',
|
|
12
|
-
'energy-memory',
|
|
13
|
-
'embodied-carbon',
|
|
14
|
-
'energy',
|
|
15
|
-
'energy-network',
|
|
16
|
-
'expected-lifespan',
|
|
17
|
-
'functional-unit',
|
|
18
|
-
'functional-unit-duration',
|
|
19
|
-
'functional-unit-time',
|
|
20
|
-
'gpu-util',
|
|
21
|
-
'grid-carbon-intensity',
|
|
22
|
-
'instance-type',
|
|
23
|
-
'location',
|
|
24
|
-
'embodied-carbon',
|
|
25
|
-
'operational-carbon',
|
|
26
|
-
'physical-processor',
|
|
27
|
-
'vendor',
|
|
28
|
-
'ram-alloc',
|
|
29
|
-
'ram-util',
|
|
30
|
-
'resources-reserved',
|
|
31
|
-
'thermal-design-power',
|
|
32
|
-
'total-embodied-emissions',
|
|
33
|
-
'timestamp',
|
|
34
|
-
'time-reserved',
|
|
35
|
-
'total-resources',
|
|
36
|
-
];
|
|
37
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW5pdHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvdW5pdHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQWEsUUFBQSxRQUFRLEdBQUc7SUFDdEIsUUFBUTtJQUNSLFlBQVk7SUFDWixVQUFVO0lBQ1YsU0FBUztJQUNULFVBQVU7SUFDVixZQUFZO0lBQ1osbUJBQW1CO0lBQ25CLGVBQWU7SUFDZixpQkFBaUI7SUFDakIsUUFBUTtJQUNSLGdCQUFnQjtJQUNoQixtQkFBbUI7SUFDbkIsaUJBQWlCO0lBQ2pCLDBCQUEwQjtJQUMxQixzQkFBc0I7SUFDdEIsVUFBVTtJQUNWLHVCQUF1QjtJQUN2QixlQUFlO0lBQ2YsVUFBVTtJQUNWLGlCQUFpQjtJQUNqQixvQkFBb0I7SUFDcEIsb0JBQW9CO0lBQ3BCLFFBQVE7SUFDUixXQUFXO0lBQ1gsVUFBVTtJQUNWLG9CQUFvQjtJQUNwQixzQkFBc0I7SUFDdEIsMEJBQTBCO0lBQzFCLFdBQVc7SUFDWCxlQU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ZScgfCAnYXZnJztcbn07XG5cbmV4cG9ydCB0eXBlIFVuaXRLZXlOYW1lID0gKHR5cGVvZiBVbml0S2V5cylbbnVtYmVyXTtcblxuZXhwb3J0IHR5cGUgVW5pdHMgPSB7XG4gIFtLIGluIFVuaXRLZXlOYW1lXTogVW5pdEZpZWxkcztcbn07XG4iXX0=
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { UnitKeyName } from '../types/units';
|
|
2
|
-
/**
|
|
3
|
-
* Units dealer 😎 .
|
|
4
|
-
*/
|
|
5
|
-
export declare const UnitsDealer: () => Promise<{
|
|
6
|
-
/**
|
|
7
|
-
* Returns aggregation method for given `unitName`. If doesn't exist then returns value `sum`.
|
|
8
|
-
*/
|
|
9
|
-
askToGiveMethodFor: (unitName: UnitKeyName) => "sum" | "avg" | "none";
|
|
10
|
-
}>;
|