@grnsft/if 0.1.7 → 0.1.8

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 (31) hide show
  1. package/coverage/clover.xml +218 -235
  2. package/coverage/coverage-final.json +11 -11
  3. package/coverage/lcov-report/config/config.ts.html +3 -9
  4. package/coverage/lcov-report/config/index.html +7 -7
  5. package/coverage/lcov-report/config/index.ts.html +3 -3
  6. package/coverage/lcov-report/config/strings.ts.html +19 -7
  7. package/coverage/lcov-report/index.html +19 -19
  8. package/coverage/lcov-report/lib/index.html +16 -16
  9. package/coverage/lcov-report/lib/models-universe.ts.html +4 -4
  10. package/coverage/lcov-report/lib/observatory.ts.html +10 -10
  11. package/coverage/lcov-report/lib/planet-aggregator.ts.html +76 -46
  12. package/coverage/lcov-report/lib/supercomputer.ts.html +68 -308
  13. package/coverage/lcov-report/models/index.html +7 -7
  14. package/coverage/lcov-report/models/index.ts.html +2 -2
  15. package/coverage/lcov-report/models/planet-aggregator.ts.html +271 -0
  16. package/coverage/lcov-report/models/time-sync.ts.html +129 -117
  17. package/coverage/lcov-report/util/args.ts.html +1 -1
  18. package/coverage/lcov-report/util/errors.ts.html +1 -1
  19. package/coverage/lcov-report/util/index.html +1 -1
  20. package/coverage/lcov-report/util/units-dealer.ts.html +12 -12
  21. package/coverage/lcov-report/util/yaml.ts.html +9 -9
  22. package/coverage/lcov.info +343 -372
  23. package/examples/impls/test/aggregation-test.yml +2 -2
  24. package/examples/impls/test/nesting.yml +93 -42
  25. package/examples/impls/test/sci.yml +3 -3
  26. package/examples/impls/test/shell.yml +5 -5
  27. package/examples/ompls/nesting.yml +91 -85
  28. package/examples/ompls/sci.yml +4 -3
  29. package/examples/ompls/shell.yml +7 -7
  30. package/jest.config.js +1 -1
  31. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  name: nesting-demo
2
2
  description:
3
3
  aggregation:
4
- aggregation-metrics: ['carbon', 'energy']
5
- aggregation-method: 'sum'
4
+ metrics: ['carbon', 'energy']
5
+ type: 'horizontal'
6
6
  tags:
7
7
  kind: web
8
8
  complexity: moderate
@@ -1,62 +1,113 @@
1
1
  name: nesting-demo
2
- description:
2
+ description: null
3
3
  tags:
4
4
  kind: web
5
5
  complexity: moderate
6
6
  category: on-premise
7
7
  initialize:
8
8
  models:
9
- - name: teads-curve
10
- model: TeadsCurveModel
11
- path: "@grnsft/if-unofficial-models"
12
9
  - name: sci-e
10
+ path: '@grnsft/if-models'
13
11
  model: SciEModel
14
- path: "@grnsft/if-models"
15
- - name: sci-m
16
- path: "@grnsft/if-models"
17
- model: SciMModel
18
- - name: sci-o
19
- model: SciOModel
20
- path: "@grnsft/if-models"
21
- - name: sci
22
- model: SciModel
23
- path: "@grnsft/if-models"
24
12
  graph:
25
13
  children:
26
- child: # an advanced grouping node
14
+ child-0:
27
15
  pipeline:
28
- - teads-curve
29
16
  - sci-e
30
- - sci-m
31
- - sci-o
32
- - sci
33
- config:
34
- teads-curve:
35
- thermal-design-power: 65
36
- sci-m:
37
- total-embodied-emissions: 251000 # gCO2eq
38
- time-reserved: 3600 # 1 hour in s
39
- expected-lifespan: 126144000 # 4 years in seconds
40
- resources-reserved: 1
41
- total-resources: 1
42
- sci-o:
43
- grid-carbon-intensity: 457 # gCO2/kwh
44
- sci:
45
- functional-unit-duration: 1
46
- functional-duration-time: ''
47
- functional-unit: requests # factor to convert per time to per f.unit
48
17
  children:
49
- child-1:
18
+ child-0-1:
19
+ pipeline:
20
+ - sci-e
21
+ config: null
50
22
  inputs:
51
23
  - timestamp: 2023-07-06T00:00
52
24
  duration: 10
53
25
  cpu-util: 50
54
- e-net: 0.000811 #kwh
55
- requests: 380
56
- child-2:
57
- inputs:
26
+ energy-network: 0.000811
27
+ outputs:
58
28
  - timestamp: 2023-07-06T00:00
59
29
  duration: 10
60
- cpu-util: 33
61
- e-net: 0.000811 #kwh
62
- requests: 380
30
+ cpu-util: 50
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
@@ -3,7 +3,7 @@ description: example invoking sci model
3
3
  tags:
4
4
  initialize:
5
5
  models:
6
- - name: sci
6
+ - name: sci
7
7
  kind: plugin
8
8
  model: SciModel
9
9
  path: "@grnsft/if-models"
@@ -14,8 +14,8 @@ graph:
14
14
  - sci
15
15
  config:
16
16
  sci:
17
- functional-unit-duration: 1
18
- functional-unit-time: 'minutes'
17
+ functional-unit-duration: 1
18
+ functional-unit-time: "1 minute"
19
19
  functional-unit: requests # factor to convert per time to per f.unit
20
20
  inputs:
21
21
  - timestamp: 2023-07-06T00:00
@@ -1,5 +1,5 @@
1
- name: ccf-demo
2
- description: example impl invoking CCF model
1
+ name: shell-demo
2
+ description: example impl invoking shell model
3
3
  tags:
4
4
  initialize:
5
5
  models:
@@ -13,7 +13,7 @@ graph:
13
13
  - sampler
14
14
  config:
15
15
  sampler:
16
- executable: python3 /usr/local/bin/sampler
16
+ command: python3 /usr/local/bin/sampler
17
17
  inputs:
18
- - timestamp: '2023-11-02T10:35:31.820Z'
19
- duration: 3600
18
+ - timestamp: "2023-11-02T10:35:31.820Z"
19
+ duration: 3600
@@ -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
- kind: builtin
13
- verbose: false
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
- e-net: 0.000811
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
- e-net: 0.000811
64
- requests: 380
65
- thermal-design-power: 65
66
- total-embodied-emissions: 251000
67
- time-reserved: 3600
68
- expected-lifespan: 126144000
69
- resources-reserved: 1
70
- total-resources: 1
71
- grid-carbon-intensity: 457
72
- functional-unit-duration: 1
73
- functional-duration-time: ''
74
- functional-unit: requests
75
- energy-cpu: 0.00013541666666666666
76
- energy: 0.00013541666666666666
77
- embodied-carbon: 7.16324200913242
78
- operational-carbon: 0.061885416666666665
79
- sci: 0.001901349322578707
80
- child-2:
81
- inputs:
82
- - timestamp: 2023-07-06T00:00
83
- duration: 10
84
- cpu-util: 33
85
- e-net: 0.000811
86
- requests: 380
87
- outputs:
88
- - timestamp: 2023-07-06T00:00
89
- duration: 10
90
- cpu-util: 33
91
- e-net: 0.000811
92
- requests: 380
93
- thermal-design-power: 65
94
- total-embodied-emissions: 251000
95
- time-reserved: 3600
96
- expected-lifespan: 126144000
97
- resources-reserved: 1
98
- total-resources: 1
99
- grid-carbon-intensity: 457
100
- functional-unit-duration: 1
101
- functional-duration-time: ''
102
- functional-unit: requests
103
- energy-cpu: 0.00011243956355860435
104
- energy: 0.00011243956355860435
105
- embodied-carbon: 7.16324200913242
106
- operational-carbon: 0.05138488054628219
107
- sci: 0.0018985860235996583
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
@@ -5,7 +5,7 @@ initialize:
5
5
  models:
6
6
  - name: sci
7
7
  kind: builtin
8
- path: ''
8
+ path: ""
9
9
  graph:
10
10
  children:
11
11
  child:
@@ -14,7 +14,7 @@ graph:
14
14
  config:
15
15
  sci:
16
16
  functional-unit-duration: 1
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: minutes
34
+ functional-unit-time: "1 minute"
35
35
  functional-unit: requests
36
+ carbon: 0.0013944444444444442
36
37
  sci: 0.0008366666666666665
@@ -1,5 +1,5 @@
1
- name: ccf-demo
2
- description: example impl invoking CCF model
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
- executable: python3 /usr/local/bin/sampler
15
+ command: python3 /usr/local/bin/sampler
16
16
  inputs:
17
- - timestamp: '2023-11-02T10:35:31.820Z'
17
+ - timestamp: "2023-11-02T10:35:31.820Z"
18
18
  duration: 3600
19
19
  outputs:
20
- - duration: 3600
20
+ - timestamp: "2023-11-02T10:35:31.820Z"
21
+ duration: 3600
21
22
  energy: 1
22
- executable: python3 /usr/local/bin/sampler
23
- timestamp: '2023-11-02T10:35:31.820Z'
23
+
package/jest.config.js CHANGED
@@ -10,5 +10,5 @@ module.exports = {
10
10
  },
11
11
  ],
12
12
  },
13
- modulePathIgnorePatterns: ['./build'],
13
+ modulePathIgnorePatterns: ['./build', './src/__tests__/unit/lib/impls'],
14
14
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@grnsft/if",
3
3
  "description": "Impact Framework",
4
- "version": "v0.1.7",
4
+ "version": "v0.1.8",
5
5
  "author": {
6
6
  "name": "Green Software Foundation",
7
7
  "email": "info@gsf.com"