@grnsft/if 0.1.2 → 0.1.3

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.
Files changed (53) hide show
  1. package/CONTRIBUTING.md +13 -17
  2. package/README.md +17 -18
  3. package/coverage/clover.xml +111 -65
  4. package/coverage/coverage-final.json +7 -6
  5. package/coverage/lcov-report/config/config.ts.html +12 -3
  6. package/coverage/lcov-report/config/index.html +1 -1
  7. package/coverage/lcov-report/config/index.ts.html +3 -3
  8. package/coverage/lcov-report/config/strings.ts.html +2 -2
  9. package/coverage/lcov-report/index.html +9 -9
  10. package/coverage/lcov-report/lib/index.html +24 -9
  11. package/coverage/lcov-report/lib/models-universe.ts.html +1 -1
  12. package/coverage/lcov-report/lib/observatory.ts.html +7 -7
  13. package/coverage/lcov-report/lib/planet-aggregator.ts.html +253 -0
  14. package/coverage/lcov-report/lib/supercomputer.ts.html +211 -52
  15. package/coverage/lcov-report/util/args.ts.html +1 -1
  16. package/coverage/lcov-report/util/errors.ts.html +10 -7
  17. package/coverage/lcov-report/util/index.html +1 -1
  18. package/coverage/lcov-report/util/yaml.ts.html +1 -1
  19. package/coverage/lcov.info +184 -105
  20. package/examples/impls/case-studies/aggregation.yml +97 -0
  21. package/examples/impls/case-studies/ntt-data-on-premise.yaml +0 -42
  22. package/examples/impls/test/aggregation-test.yml +109 -0
  23. package/examples/impls/test/large-impl.yml +257303 -0
  24. package/examples/ompls/aggregation-test.yml +340 -0
  25. package/package.json +1 -1
  26. package/tsconfig.build.tsbuildinfo +1 -0
  27. package/yarn-error.log +5431 -0
  28. package/build/config/index.d.ts +0 -2
  29. package/build/config/index.js +0 -8
  30. package/build/config/strings.d.ts +0 -14
  31. package/build/config/strings.js +0 -30
  32. package/build/index.d.ts +0 -2
  33. package/build/index.js +0 -46
  34. package/build/lib/models-universe.d.ts +0 -28
  35. package/build/lib/models-universe.js +0 -95
  36. package/build/lib/supercomputer.d.ts +0 -30
  37. package/build/lib/supercomputer.js +0 -109
  38. package/build/types/azure-importer.d.ts +0 -29
  39. package/build/types/azure-importer.js +0 -3
  40. package/build/types/boavizta.d.ts +0 -7
  41. package/build/types/boavizta.js +0 -3
  42. package/build/types/common.d.ts +0 -7
  43. package/build/types/common.js +0 -9
  44. package/build/types/impl.d.ts +0 -40
  45. package/build/types/impl.js +0 -3
  46. package/build/types/models-universe.d.ts +0 -24
  47. package/build/types/models-universe.js +0 -3
  48. package/build/util/args.d.ts +0 -8
  49. package/build/util/helpers.d.ts +0 -4
  50. package/build/util/validations.d.ts +0 -25
  51. package/build/util/validations.js +0 -52
  52. package/build/util/yaml.d.ts +0 -13
  53. package/build/util/yaml.js +0 -36
@@ -2,7 +2,7 @@ TN:
2
2
  SF:src/config/config.ts
3
3
  FNF:0
4
4
  FNH:0
5
- DA:5,3
5
+ DA:5,4
6
6
  LF:1
7
7
  LH:1
8
8
  BRF:0
@@ -14,10 +14,10 @@ FN:1,(anonymous_0)
14
14
  FN:2,(anonymous_1)
15
15
  FNF:2
16
16
  FNH:2
17
- FNDA:3,(anonymous_0)
17
+ FNDA:6,(anonymous_0)
18
18
  FNDA:8,(anonymous_1)
19
- DA:1,6
20
- DA:2,11
19
+ DA:1,10
20
+ DA:2,12
21
21
  LF:2
22
22
  LH:2
23
23
  BRF:0
@@ -35,7 +35,7 @@ FNDA:3,(anonymous_0)
35
35
  FNDA:5,(anonymous_1)
36
36
  FNDA:3,(anonymous_2)
37
37
  FNDA:3,(anonymous_3)
38
- DA:3,4
38
+ DA:3,5
39
39
  DA:11,3
40
40
  DA:13,5
41
41
  DA:31,3
@@ -125,108 +125,187 @@ FN:20,(anonymous_1)
125
125
  FN:31,(anonymous_2)
126
126
  FNF:3
127
127
  FNH:3
128
- FNDA:12,(anonymous_0)
129
- FNDA:19,(anonymous_1)
130
- FNDA:13,(anonymous_2)
128
+ FNDA:20,(anonymous_0)
129
+ FNDA:37,(anonymous_1)
130
+ FNDA:17,(anonymous_2)
131
131
  DA:6,2
132
- DA:8,12
133
- DA:14,12
134
- DA:21,19
135
- DA:23,19
136
- DA:25,19
137
- DA:32,13
132
+ DA:8,20
133
+ DA:14,20
134
+ DA:21,37
135
+ DA:23,37
136
+ DA:25,37
137
+ DA:32,17
138
138
  LF:7
139
139
  LH:7
140
- BRDA:21,0,0,10
141
- BRDA:21,0,1,9
140
+ BRDA:21,0,0,20
141
+ BRDA:21,0,1,17
142
142
  BRF:2
143
143
  BRH:2
144
144
  end_of_record
145
145
  TN:
146
+ SF:src/lib/planet-aggregator.ts
147
+ FN:18,(anonymous_0)
148
+ FN:34,(anonymous_1)
149
+ FNF:2
150
+ FNH:2
151
+ FNDA:18,(anonymous_0)
152
+ FNDA:22,(anonymous_1)
153
+ DA:1,2
154
+ DA:3,2
155
+ DA:11,2
156
+ DA:13,2
157
+ DA:18,2
158
+ DA:22,18
159
+ DA:26,2
160
+ DA:31,16
161
+ DA:32,16
162
+ DA:34,16
163
+ DA:35,22
164
+ DA:36,28
165
+ DA:37,2
166
+ DA:42,26
167
+ DA:43,26
168
+ DA:44,26
169
+ DA:45,26
170
+ DA:47,26
171
+ DA:48,16
172
+ DA:49,13
173
+ DA:54,20
174
+ LF:21
175
+ LH:21
176
+ BRDA:22,0,0,2
177
+ BRDA:23,1,0,18
178
+ BRDA:23,1,1,17
179
+ BRDA:36,2,0,2
180
+ BRDA:44,3,0,26
181
+ BRDA:44,3,1,16
182
+ BRDA:47,4,0,16
183
+ BRDA:48,5,0,13
184
+ BRF:8
185
+ BRH:8
186
+ end_of_record
187
+ TN:
146
188
  SF:src/lib/supercomputer.ts
147
- FN:23,(anonymous_0)
148
- FN:31,(anonymous_1)
149
- FN:37,(anonymous_2)
150
- FN:52,(anonymous_3)
151
- FN:60,(anonymous_4)
152
- FN:73,(anonymous_5)
153
- FN:139,(anonymous_6)
154
- FNF:7
155
- FNH:7
156
- FNDA:6,(anonymous_0)
157
- FNDA:16,(anonymous_1)
158
- FNDA:16,(anonymous_2)
159
- FNDA:8,(anonymous_3)
160
- FNDA:11,(anonymous_4)
161
- FNDA:10,(anonymous_5)
162
- FNDA:6,(anonymous_6)
189
+ FN:28,(anonymous_0)
190
+ FN:36,(anonymous_1)
191
+ FN:43,(anonymous_2)
192
+ FN:46,(anonymous_3)
193
+ FN:64,(anonymous_4)
194
+ FN:70,(anonymous_5)
195
+ FN:85,(anonymous_6)
196
+ FN:93,(anonymous_7)
197
+ FN:106,(anonymous_8)
198
+ FN:192,(anonymous_9)
199
+ FNF:10
200
+ FNH:10
201
+ FNDA:11,(anonymous_0)
202
+ FNDA:4,(anonymous_1)
203
+ FNDA:7,(anonymous_2)
204
+ FNDA:7,(anonymous_3)
205
+ FNDA:32,(anonymous_4)
206
+ FNDA:34,(anonymous_5)
207
+ FNDA:16,(anonymous_6)
208
+ FNDA:22,(anonymous_7)
209
+ FNDA:19,(anonymous_8)
210
+ FNDA:11,(anonymous_9)
163
211
  DA:2,1
164
212
  DA:4,1
165
213
  DA:6,1
166
- DA:11,1
214
+ DA:10,1
167
215
  DA:13,1
168
- DA:18,1
169
- DA:19,6
170
- DA:24,6
171
- DA:25,6
172
- DA:32,16
173
- DA:33,1
174
- DA:36,15
175
- DA:37,15
176
- DA:38,16
177
- DA:43,16
178
- DA:46,15
179
- DA:57,8
180
- DA:58,8
181
- DA:60,11
182
- DA:77,10
183
- DA:79,10
184
- DA:80,6
185
- DA:86,10
186
- DA:88,10
187
- DA:89,1
188
- DA:92,9
189
- DA:93,1
190
- DA:96,8
191
- DA:100,8
192
- DA:102,8
193
- DA:108,8
194
- DA:110,8
195
- DA:111,18
196
- DA:112,18
197
- DA:117,17
198
- DA:120,7
199
- DA:122,7
200
- DA:125,4
201
- DA:129,4
202
- DA:132,3
203
- DA:133,3
204
- DA:140,6
205
- DA:141,6
206
- DA:142,6
207
- DA:145,6
208
- DA:147,6
209
- DA:148,10
210
- DA:154,4
211
- LF:48
212
- LH:48
213
- BRDA:32,0,0,1
214
- BRDA:79,1,0,6
215
- BRDA:88,2,0,1
216
- BRDA:92,3,0,1
217
- BRDA:96,4,0,4
218
- BRDA:96,4,1,4
219
- BRDA:100,5,0,8
220
- BRDA:100,5,1,5
221
- BRDA:111,6,0,18
222
- BRDA:111,6,1,17
223
- BRDA:122,7,0,4
224
- BRDA:140,8,0,6
225
- BRDA:140,8,1,5
226
- BRDA:142,9,0,1
227
- BRDA:142,9,1,5
228
- BRF:15
229
- BRH:15
216
+ DA:15,1
217
+ DA:16,1
218
+ DA:21,1
219
+ DA:22,11
220
+ DA:25,11
221
+ DA:26,11
222
+ DA:29,11
223
+ DA:30,11
224
+ DA:37,4
225
+ DA:38,1
226
+ DA:41,3
227
+ DA:43,3
228
+ DA:44,7
229
+ DA:46,7
230
+ DA:47,7
231
+ DA:48,7
232
+ DA:50,7
233
+ DA:51,3
234
+ DA:52,2
235
+ DA:57,7
236
+ DA:65,32
237
+ DA:66,1
238
+ DA:69,31
239
+ DA:70,31
240
+ DA:71,34
241
+ DA:76,34
242
+ DA:79,31
243
+ DA:90,16
244
+ DA:91,16
245
+ DA:93,22
246
+ DA:110,19
247
+ DA:112,19
248
+ DA:113,11
249
+ DA:119,19
250
+ DA:121,19
251
+ DA:122,2
252
+ DA:125,17
253
+ DA:126,1
254
+ DA:129,16
255
+ DA:131,16
256
+ DA:135,16
257
+ DA:137,16
258
+ DA:143,16
259
+ DA:145,16
260
+ DA:146,36
261
+ DA:147,36
262
+ DA:152,35
263
+ DA:155,15
264
+ DA:160,15
265
+ DA:161,13
266
+ DA:166,12
267
+ DA:168,12
268
+ DA:169,8
269
+ DA:173,4
270
+ DA:178,14
271
+ DA:179,8
272
+ DA:183,6
273
+ DA:186,14
274
+ DA:193,11
275
+ DA:194,11
276
+ DA:195,11
277
+ DA:198,11
278
+ DA:200,11
279
+ DA:201,19
280
+ DA:207,8
281
+ LF:70
282
+ LH:70
283
+ BRDA:37,0,0,1
284
+ BRDA:47,1,0,7
285
+ BRDA:47,1,1,3
286
+ BRDA:50,2,0,3
287
+ BRDA:51,3,0,2
288
+ BRDA:65,4,0,1
289
+ BRDA:112,5,0,11
290
+ BRDA:121,6,0,2
291
+ BRDA:125,7,0,1
292
+ BRDA:131,8,0,8
293
+ BRDA:131,8,1,8
294
+ BRDA:135,9,0,16
295
+ BRDA:135,9,1,9
296
+ BRDA:146,10,0,36
297
+ BRDA:146,10,1,35
298
+ BRDA:160,11,0,13
299
+ BRDA:168,12,0,8
300
+ BRDA:168,12,1,4
301
+ BRDA:178,13,0,8
302
+ BRDA:178,13,1,6
303
+ BRDA:193,14,0,11
304
+ BRDA:193,14,1,9
305
+ BRDA:195,15,0,2
306
+ BRDA:195,15,1,9
307
+ BRF:24
308
+ BRH:24
230
309
  end_of_record
231
310
  TN:
232
311
  SF:src/util/args.ts
@@ -273,18 +352,18 @@ BRH:5
273
352
  end_of_record
274
353
  TN:
275
354
  SF:src/util/errors.ts
276
- FN:12,(anonymous_0)
277
- FN:16,(anonymous_1)
355
+ FN:13,(anonymous_0)
356
+ FN:17,(anonymous_1)
278
357
  FNF:2
279
358
  FNH:2
280
- FNDA:12,(anonymous_0)
281
- FNDA:9,(anonymous_1)
282
- DA:1,3
283
- DA:12,3
284
- DA:13,12
285
- DA:17,9
286
- DA:18,9
287
- DA:23,12
359
+ FNDA:20,(anonymous_0)
360
+ FNDA:14,(anonymous_1)
361
+ DA:1,4
362
+ DA:13,4
363
+ DA:14,20
364
+ DA:18,14
365
+ DA:19,14
366
+ DA:24,20
288
367
  LF:6
289
368
  LH:6
290
369
  BRF:0
@@ -0,0 +1,97 @@
1
+ name: nesting-demo
2
+ description:
3
+ aggregation:
4
+ aggregation-metrics: ['carbon', 'energy']
5
+ aggregation-method: 'sum' # should default to sum if no value given
6
+ tags:
7
+ kind: web
8
+ complexity: moderate
9
+ category: on-premise
10
+ initialize:
11
+ models:
12
+ - name: teads-curve
13
+ model: TeadsCurveModel
14
+ path: "@grnsft/if-unofficial-models"
15
+ - name: sci-e
16
+ model: SciEModel
17
+ path: "@grnsft/if-models"
18
+ - name: sci-m
19
+ path: "@grnsft/if-models"
20
+ model: SciMModel
21
+ - name: sci-o
22
+ model: SciOModel
23
+ path: "@grnsft/if-models"
24
+ - name: sci
25
+ model: SciModel
26
+ path: "@grnsft/if-models"
27
+ graph:
28
+ children:
29
+ child: # an advanced grouping node
30
+ pipeline:
31
+ - teads-curve
32
+ - 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 # gCO2eq
41
+ time-reserved: 3600 # 1 hour in s
42
+ expected-lifespan: 126144000 # 4 years in seconds
43
+ resources-reserved: 1
44
+ total-resources: 1
45
+ sci-o:
46
+ grid-carbon-intensity: 457 # gCO2/kwh
47
+ sci:
48
+ functional-unit-duration: 1
49
+ functional-duration-time: ''
50
+ functional-unit: requests # factor to convert per time to per f.unit
51
+ children:
52
+ child-1:
53
+ inputs:
54
+ - timestamp: 2023-07-06T00:00
55
+ duration: 10
56
+ cpu-util: 50
57
+ e-net: 0.000811 #kwh
58
+ requests: 380
59
+ carbon: 10
60
+ energy: 20
61
+ - timestamp: 2023-07-06T00:00
62
+ duration: 10
63
+ cpu-util: 50
64
+ e-net: 0.000811 #kwh
65
+ requests: 380
66
+ carbon: 10
67
+ energy: 20
68
+ - timestamp: 2023-07-06T00:00
69
+ duration: 10
70
+ cpu-util: 50
71
+ e-net: 0.000811 #kwh
72
+ requests: 380
73
+ carbon: 10
74
+ energy: 20
75
+ child-2:
76
+ inputs:
77
+ - timestamp: 2023-07-06T00:00
78
+ duration: 10
79
+ cpu-util: 50
80
+ e-net: 0.000811 #kwh
81
+ requests: 380
82
+ carbon: 10
83
+ energy: 20
84
+ - timestamp: 2023-07-06T00:00
85
+ duration: 10
86
+ cpu-util: 50
87
+ e-net: 0.000811 #kwh
88
+ requests: 380
89
+ carbon: 10
90
+ energy: 20
91
+ - timestamp: 2023-07-06T00:00
92
+ duration: 10
93
+ cpu-util: 50
94
+ e-net: 0.000811 #kwh
95
+ requests: 380
96
+ carbon: 10
97
+ energy: 20
@@ -4,9 +4,6 @@ tags:
4
4
  kind: web
5
5
  complexity: moderate
6
6
  category: on-premise
7
- aggregation:
8
- fields:
9
- methods:
10
7
  initialize:
11
8
  models:
12
9
  - name: sci-e
@@ -60,7 +57,6 @@ graph:
60
57
  - sci-m
61
58
  - sci-o
62
59
  - sci
63
- - aggregate
64
60
  config:
65
61
  sci-m:
66
62
  total-embodied-emissions: 251000 # gCO2eq
@@ -74,9 +70,6 @@ graph:
74
70
  functional-unit-duration: 1
75
71
  functional-duration-time: ''
76
72
  functional-unit: requests # factor to convert per time to per f.unit
77
- aggregate:
78
- fields: ['energy', 'carbon']
79
- method: sum # sum, average
80
73
  children:
81
74
  switch-1:
82
75
  inputs:
@@ -85,41 +78,6 @@ graph:
85
78
  energy-network: 0.000811 #kwh
86
79
  grid-carbon-intensity: 457 # gCO2e/kWh
87
80
  requests: 38032740
88
- - timestamp: 2023-07-06T00:00
89
- duration: 1
90
- energy-network: 0.000811 #kwh
91
- grid-carbon-intensity: 457 # gCO2e/kWh
92
- requests: 38032740
93
- - timestamp: 2023-07-06T00:00
94
- duration: 1
95
- energy-network: 0.000811 #kwh
96
- grid-carbon-intensity: 457 # gCO2e/kWh
97
- requests: 38032740
98
- outputs:
99
- - timestamp: 2023-07-06T00:00
100
- duration: 1
101
- energy-network: 0.000811 #kwh
102
- grid-carbon-intensity: 457 # gCO2e/kWh
103
- requests: 38032740
104
- energy: 10
105
- carbon: 10
106
- aggregated-energy: 38
107
- - timestamp: 2023-07-06T00:00
108
- duration: 1
109
- energy-network: 0.000811 #kwh
110
- grid-carbon-intensity: 457 # gCO2e/kWh
111
- requests: 38032740
112
- energy: 12
113
- carbon: 12
114
- aggregated-energy: 38
115
- - timestamp: 2023-07-06T00:00
116
- duration: 1
117
- energy-network: 0.000811 #kwh
118
- grid-carbon-intensity: 457 # gCO2e/kWh
119
- requests: 38032740
120
- energy: 16
121
- carbon: 16
122
- aggregated-energy: 38
123
81
  switch-2:
124
82
  inputs:
125
83
  - timestamp: 2023-07-06T00:00
@@ -0,0 +1,109 @@
1
+ name: nesting-demo
2
+ description:
3
+ aggregation:
4
+ aggregation-metrics: ['carbon', 'energy']
5
+ aggregation-method: 'sum'
6
+ tags:
7
+ kind: web
8
+ complexity: moderate
9
+ category: on-premise
10
+ initialize:
11
+ models:
12
+ - name: teads-curve
13
+ model: TeadsCurveModel
14
+ path: "@grnsft/if-unofficial-models"
15
+ - name: sci-e
16
+ model: SciEModel
17
+ path: "@grnsft/if-models"
18
+ - name: sci-m
19
+ path: "@grnsft/if-models"
20
+ model: SciMModel
21
+ - name: sci-o
22
+ model: SciOModel
23
+ path: "@grnsft/if-models"
24
+ - name: sci
25
+ model: SciModel
26
+ path: "@grnsft/if-models"
27
+ graph:
28
+ children:
29
+ child: # an advanced grouping node
30
+ pipeline:
31
+ - teads-curve
32
+ - 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 # gCO2eq
41
+ time-reserved: 3600 # 1 hour in s
42
+ expected-lifespan: 126144000 # 4 years in seconds
43
+ resources-reserved: 1
44
+ total-resources: 1
45
+ sci-o:
46
+ grid-carbon-intensity: 457 # gCO2/kwh
47
+ sci:
48
+ functional-unit-duration: 1
49
+ functional-duration-time: ''
50
+ functional-unit: requests # factor to convert per time to per f.unit
51
+ children:
52
+ child-1:
53
+ inputs:
54
+ - timestamp: 2023-07-06T00:00
55
+ duration: 10
56
+ cpu-util: 10
57
+ e-net: 0.000811 #kwh
58
+ requests: 380
59
+ - timestamp: 2023-07-06T00:10
60
+ duration: 10
61
+ cpu-util: 10
62
+ e-net: 0.000811 #kwh
63
+ requests: 380
64
+ - timestamp: 2023-07-06T00:20
65
+ duration: 10
66
+ cpu-util: 10
67
+ e-net: 0.000811 #kwh
68
+ requests: 380
69
+ - timestamp: 2023-07-06T00:30
70
+ duration: 10
71
+ cpu-util: 10
72
+ e-net: 0.000811 #kwh
73
+ requests: 380
74
+ child-2:
75
+ inputs:
76
+ - timestamp: 2023-07-06T00:00
77
+ duration: 10
78
+ cpu-util: 20
79
+ e-net: 0.000811 #kwh
80
+ requests: 380
81
+ - timestamp: 2023-07-06T00:10
82
+ duration: 10
83
+ cpu-util: 30
84
+ e-net: 0.000811 #kwh
85
+ requests: 380
86
+ - timestamp: 2023-07-06T00:20
87
+ duration: 10
88
+ cpu-util: 40
89
+ e-net: 0.000811 #kwh
90
+ requests: 380
91
+ - timestamp: 2023-07-06T00:30
92
+ duration: 10
93
+ cpu-util: 50
94
+ e-net: 0.000811 #kwh
95
+ requests: 380
96
+ child-3:
97
+ inputs:
98
+ - timestamp: 2023-07-06T00:00
99
+ duration: 10
100
+ cpu-util: 10
101
+ e-net: 0.000811 #kwh
102
+ requests: 380
103
+ child-4:
104
+ inputs:
105
+ - timestamp: 2023-07-06T00:00
106
+ duration: 10
107
+ cpu-util: 10
108
+ e-net: 0.000811 #kwh
109
+ requests: 380