@grnsft/if 0.1.9 → 0.2.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.
Files changed (176) hide show
  1. package/.commitlintrc.js +45 -0
  2. package/.husky/commit-msg +4 -0
  3. package/.husky/pre-commit +6 -0
  4. package/CONTRIBUTING.md +81 -98
  5. package/README.md +16 -12
  6. package/build/config/config.d.ts +4 -3
  7. package/build/config/config.js +11 -10
  8. package/build/config/params.js +17 -17
  9. package/build/config/strings.d.ts +9 -8
  10. package/build/config/strings.js +13 -12
  11. package/build/index.js +19 -69
  12. package/build/lib/aggregate.d.ts +6 -0
  13. package/build/lib/aggregate.js +72 -0
  14. package/build/lib/compute.d.ts +5 -0
  15. package/build/lib/compute.js +84 -0
  16. package/build/lib/exhaust.d.ts +6 -0
  17. package/build/lib/exhaust.js +47 -0
  18. package/build/lib/initialize.d.ts +6 -0
  19. package/build/lib/initialize.js +98 -0
  20. package/build/lib/load.d.ts +6 -0
  21. package/build/lib/load.js +24 -0
  22. package/build/lib/parameterize.d.ts +5 -0
  23. package/build/lib/parameterize.js +49 -0
  24. package/build/models/export-csv.d.ts +2 -0
  25. package/build/models/export-csv.js +129 -0
  26. package/build/models/export-log.d.ts +4 -0
  27. package/build/models/export-log.js +18 -0
  28. package/build/models/export-yaml.d.ts +4 -0
  29. package/build/models/export-yaml.js +24 -0
  30. package/build/models/group-by.d.ts +11 -0
  31. package/build/models/group-by.js +56 -0
  32. package/build/models/index.d.ts +2 -1
  33. package/build/models/index.js +5 -3
  34. package/build/models/time-sync.d.ts +2 -57
  35. package/build/models/time-sync.js +204 -158
  36. package/build/types/aggregation.js +5 -0
  37. package/build/types/compute.d.ts +25 -0
  38. package/build/types/compute.js +3 -0
  39. package/build/types/exhaust-plugin-interface.d.ts +7 -0
  40. package/build/types/exhaust-plugin-interface.js +3 -0
  41. package/build/types/group-by.d.ts +3 -0
  42. package/build/types/group-by.js +3 -0
  43. package/build/types/initialize.d.ts +4 -0
  44. package/build/types/initialize.js +3 -0
  45. package/build/types/interface.d.ts +8 -0
  46. package/build/types/interface.js +3 -0
  47. package/build/types/load.d.ts +7 -0
  48. package/build/types/load.js +3 -0
  49. package/build/types/manifest.d.ts +40 -0
  50. package/build/types/manifest.js +3 -0
  51. package/build/types/parameters.d.ts +4 -5
  52. package/build/types/parameters.js +1 -1
  53. package/build/types/process-args.d.ts +3 -5
  54. package/build/types/process-args.js +1 -1
  55. package/build/types/time-sync.d.ts +9 -2
  56. package/build/types/time-sync.js +1 -1
  57. package/build/util/aggregation-helper.d.ts +6 -0
  58. package/build/util/aggregation-helper.js +56 -0
  59. package/build/util/args.d.ts +6 -3
  60. package/build/util/args.js +21 -17
  61. package/build/util/errors.d.ts +1 -1
  62. package/build/util/errors.js +8 -4
  63. package/build/util/helpers.d.ts +4 -0
  64. package/build/util/helpers.js +23 -4
  65. package/build/util/json.d.ts +4 -0
  66. package/build/util/json.js +16 -0
  67. package/build/util/logger.d.ts +5 -0
  68. package/build/util/logger.js +40 -0
  69. package/build/util/validations.d.ts +22 -19
  70. package/build/util/validations.js +41 -34
  71. package/examples/{impls/test → manifests}/azure-importer.yml +8 -8
  72. package/examples/manifests/basic-demo.yml +75 -0
  73. package/examples/manifests/basic.yml +27 -0
  74. package/examples/manifests/boavizta-pipeline.yml +85 -0
  75. package/examples/{impls/test → manifests}/boavizta.yml +11 -12
  76. package/examples/{impls/test → manifests}/ccf.yml +9 -10
  77. package/examples/manifests/cim.yml +20 -0
  78. package/examples/manifests/cloud-metadata.yml +41 -0
  79. package/examples/manifests/co2js.yml +30 -0
  80. package/examples/manifests/coefficient.yml +23 -0
  81. package/examples/manifests/csv-export.yml +34 -0
  82. package/examples/manifests/e-mem.yml +21 -0
  83. package/examples/{impls/test → manifests}/e-net.yml +9 -8
  84. package/examples/manifests/generics.yml +71 -0
  85. package/examples/manifests/group-by.yml +48 -0
  86. package/examples/manifests/mock-observation.yml +33 -0
  87. package/examples/manifests/multiply.yml +23 -0
  88. package/examples/manifests/nesting-demo.yml +89 -0
  89. package/examples/manifests/nesting.yml +215 -0
  90. package/examples/manifests/pipeline-demo-1.yml +85 -0
  91. package/examples/manifests/pipeline-demo-2.yml +149 -0
  92. package/examples/manifests/pipeline-demo.yml +128 -0
  93. package/examples/manifests/pipeline-teads-sci.yml +82 -0
  94. package/examples/manifests/pipeline-with-generics.yml +147 -0
  95. package/examples/manifests/pipeline-with-mocks.yml +146 -0
  96. package/examples/{impls/test → manifests}/sci-e.yml +6 -8
  97. package/examples/manifests/sci-m.yml +23 -0
  98. package/examples/{impls/test → manifests}/sci-o.yml +10 -10
  99. package/examples/{impls/test → manifests}/sci.yml +10 -9
  100. package/examples/manifests/shell.yml +20 -0
  101. package/examples/manifests/sum.yml +23 -0
  102. package/examples/{impls/test → manifests}/tdp-finder.yml +6 -7
  103. package/examples/manifests/teads-aws.yml +22 -0
  104. package/examples/manifests/teads-curve.yml +20 -0
  105. package/examples/manifests/time-sync.yml +32 -0
  106. package/examples/manifests/watt-time.yml +42 -0
  107. package/jest.config.js +6 -1
  108. package/package.json +13 -8
  109. package/src/__tests__/integration/templates/integration.yaml +16 -0
  110. package/src/models/README.md +6 -6
  111. package/tsconfig.test.json +1 -1
  112. package/Makefile +0 -16
  113. package/build/lib/aggregator.d.ts +0 -7
  114. package/build/lib/aggregator.js +0 -46
  115. package/build/lib/models-universe.d.ts +0 -40
  116. package/build/lib/models-universe.js +0 -145
  117. package/build/lib/observatory.d.ts +0 -20
  118. package/build/lib/observatory.js +0 -31
  119. package/build/lib/supercomputer.d.ts +0 -39
  120. package/build/lib/supercomputer.js +0 -116
  121. package/build/types/aggregator.js +0 -5
  122. package/build/types/impl.d.ts +0 -92
  123. package/build/types/impl.js +0 -19
  124. package/build/types/model-interface.d.ts +0 -13
  125. package/build/types/model-interface.js +0 -3
  126. package/build/types/models-universe.d.ts +0 -20
  127. package/build/types/models-universe.js +0 -3
  128. package/build/types/supercomputer.d.ts +0 -4
  129. package/build/types/supercomputer.js +0 -3
  130. package/build/util/param-selectors.d.ts +0 -5
  131. package/build/util/param-selectors.js +0 -14
  132. package/examples/impls/case-studies/accenture.yml +0 -155
  133. package/examples/impls/case-studies/aggregation.yml +0 -97
  134. package/examples/impls/case-studies/aveva.yaml +0 -48
  135. package/examples/impls/case-studies/azure-yassine.yaml +0 -67
  136. package/examples/impls/case-studies/boavizta.yml +0 -26
  137. package/examples/impls/case-studies/dow_msft.yml +0 -173
  138. package/examples/impls/case-studies/farm-insights.yaml +0 -35
  139. package/examples/impls/case-studies/gsf-website.yaml +0 -93
  140. package/examples/impls/case-studies/msft-eshoppen.yaml +0 -162
  141. package/examples/impls/case-studies/msft-green-ai.yaml +0 -58
  142. package/examples/impls/case-studies/ntt-data-on-premise.yaml +0 -201
  143. package/examples/impls/test/aggregation-test.yml +0 -109
  144. package/examples/impls/test/aggregation-test2.yml +0 -52
  145. package/examples/impls/test/cim.yml +0 -19
  146. package/examples/impls/test/e-mem.yml +0 -19
  147. package/examples/impls/test/if-demo.yml +0 -59
  148. package/examples/impls/test/large-impl.yml +0 -257303
  149. package/examples/impls/test/metadata.yml +0 -21
  150. package/examples/impls/test/nesting.yml +0 -113
  151. package/examples/impls/test/new-params-test.yml +0 -35
  152. package/examples/impls/test/sci-m.yml +0 -24
  153. package/examples/impls/test/shell.yml +0 -19
  154. package/examples/impls/test/teads-cpu.yml +0 -18
  155. package/examples/impls/test/time-sync-avoid-padding.yml +0 -50
  156. package/examples/impls/test/time-sync.yml +0 -76
  157. package/examples/ompls/aggregation-test.yml +0 -340
  158. package/examples/ompls/aggregation-test2.yml +0 -83
  159. package/examples/ompls/azure-importer.yml +0 -145
  160. package/examples/ompls/boavizta.yml +0 -32
  161. package/examples/ompls/ccf.yml +0 -29
  162. package/examples/ompls/cim.yml +0 -29
  163. package/examples/ompls/complex-pipeline.yml +0 -105
  164. package/examples/ompls/e-mem.yml +0 -26
  165. package/examples/ompls/full-sci.yml +0 -64
  166. package/examples/ompls/if-demo.yml +0 -517
  167. package/examples/ompls/metadata.yml +0 -29
  168. package/examples/ompls/nesting.yml +0 -113
  169. package/examples/ompls/sci-e.yml +0 -23
  170. package/examples/ompls/sci-m.yml +0 -33
  171. package/examples/ompls/sci-o.yml +0 -29
  172. package/examples/ompls/sci.yml +0 -37
  173. package/examples/ompls/shell.yml +0 -23
  174. package/examples/ompls/teads-cpu.yml +0 -24
  175. package/examples/ompls/time-sync.yml +0 -212
  176. /package/build/types/{aggregator.d.ts → aggregation.d.ts} +0 -0
@@ -0,0 +1,149 @@
1
+ name: pipeline-demo
2
+ description:
3
+ tags:
4
+ aggregation:
5
+ metrics:
6
+ - "carbon"
7
+ type: "both"
8
+ initialize:
9
+ plugins:
10
+ "teads-curve":
11
+ path: "@grnsft/if-unofficial-plugins"
12
+ method: TeadsCurve
13
+ global-config:
14
+ interpolation: spline
15
+ "sum":
16
+ path: "@grnsft/if-plugins"
17
+ method: Sum
18
+ global-config:
19
+ input-parameters:
20
+ - cpu/energy
21
+ - network/energy
22
+ output-parameter: carbon-plus-energy'
23
+ "sci-m":
24
+ path: "@grnsft/if-plugins"
25
+ method: SciM
26
+ "sci-o":
27
+ path: "@grnsft/if-plugins"
28
+ method: SciO
29
+ "sci":
30
+ path: "@grnsft/if-plugins"
31
+ method: Sci
32
+ global-config:
33
+ functional-unit: "requests"
34
+ functional-unit-time: "1 minute"
35
+ "time-sync":
36
+ method: TimeSync
37
+ path: "builtin"
38
+ global-config:
39
+ start-time: "2023-12-12T00:00:00.000Z"
40
+ end-time: "2023-12-12T00:01:00.000Z"
41
+ interval: 5
42
+ allow-padding: true
43
+ "group-by":
44
+ path: builtin
45
+ method: GroupBy
46
+ tree:
47
+ children:
48
+ child-1:
49
+ pipeline:
50
+ - teads-curve
51
+ - sum
52
+ - sci-m
53
+ - sci-o
54
+ - time-sync
55
+ - sci
56
+ config:
57
+ group-by:
58
+ group:
59
+ - region
60
+ - instance-type
61
+ defaults:
62
+ cpu/thermal-design-power: 100
63
+ grid/carbon-intensity: 800
64
+ device/emissions-embodied: 1533.120 # gCO2eq
65
+ time-reserved: 3600 # 1hr in seconds
66
+ device/expected-lifespan: 94608000 # 3 years in seconds
67
+ resources-reserved: 1
68
+ resources-total: 8
69
+ functional-unit-time: "1 min"
70
+ inputs:
71
+ - timestamp: "2023-12-12T00:00:00.000Z"
72
+ instance-type: A1
73
+ region: uk-west
74
+ duration: 1
75
+ cpu/utilization: 10
76
+ network/energy: 10
77
+ energy: 5
78
+ - timestamp: "2023-12-12T00:00:01.000Z"
79
+ duration: 5
80
+ cpu/utilization: 20
81
+ instance-type: A1
82
+ region: uk-west
83
+ network/energy: 10
84
+ energy: 5
85
+ - timestamp: "2023-12-12T00:00:06.000Z"
86
+ duration: 7
87
+ cpu/utilization: 15
88
+ instance-type: A1
89
+ region: uk-west
90
+ network/energy: 10
91
+ energy: 5
92
+ - timestamp: "2023-12-12T00:00:13.000Z"
93
+ duration: 30
94
+ instance-type: A1
95
+ region: uk-west
96
+ cpu/utilization: 15
97
+ network/energy: 10
98
+ energy: 5
99
+ child-2:
100
+ pipeline:
101
+ - teads-curve
102
+ - sum
103
+ - sci-m
104
+ - sci-o
105
+ - time-sync
106
+ - sci
107
+ config:
108
+ group-by:
109
+ group:
110
+ - region
111
+ - instance-type
112
+ defaults:
113
+ cpu/thermal-design-power: 100
114
+ grid/carbon-intensity: 800
115
+ device/emissions-embodied: 1533.120 # gCO2eq
116
+ time-reserved: 3600 # 1hr in seconds
117
+ device/expected-lifespan: 94608000 # 3 years in seconds
118
+ resources-reserved: 1
119
+ resources-total: 8
120
+ functional-unit-time: "1 min"
121
+ inputs:
122
+ - timestamp: "2023-12-12T00:00:00.000Z"
123
+ duration: 1
124
+ cpu/utilization: 30
125
+ instance-type: A1
126
+ region: uk-west
127
+ network/energy: 10
128
+ energy: 5
129
+ - timestamp: "2023-12-12T00:00:01.000Z"
130
+ duration: 5
131
+ cpu/utilization: 28
132
+ instance-type: A1
133
+ region: uk-west
134
+ network/energy: 10
135
+ energy: 5
136
+ - timestamp: "2023-12-12T00:00:06.000Z"
137
+ duration: 7
138
+ cpu/utilization: 40
139
+ instance-type: A1
140
+ region: uk-west
141
+ network/energy: 10
142
+ energy: 5
143
+ - timestamp: "2023-12-12T00:00:13.000Z"
144
+ duration: 30
145
+ cpu/utilization: 33
146
+ instance-type: A1
147
+ region: uk-west
148
+ network/energy: 10
149
+ energy: 5
@@ -0,0 +1,128 @@
1
+ name: realistic-pipeline-demo
2
+ description:
3
+ tags:
4
+ aggregation:
5
+ metrics:
6
+ - "carbon"
7
+ type: "both"
8
+ initialize:
9
+ plugins:
10
+ "teads-curve":
11
+ path: "@grnsft/if-unofficial-plugins"
12
+ method: TeadsCurve
13
+ global-config:
14
+ interpolation: spline
15
+ "sci-e":
16
+ path: "@grnsft/if-plugins"
17
+ method: SciE
18
+ "sci-m":
19
+ path: "@grnsft/if-plugins"
20
+ method: SciM
21
+ "sci-o":
22
+ path: "@grnsft/if-plugins"
23
+ method: SciO
24
+ "sci":
25
+ path: "@grnsft/if-plugins"
26
+ method: Sci
27
+ global-config:
28
+ functional-unit: "requests"
29
+ functional-unit-time: "1 minute"
30
+ "time-sync":
31
+ method: TimeSync
32
+ path: "builtin"
33
+ global-config:
34
+ start-time: "2023-12-12T00:00:00.000Z"
35
+ end-time: "2023-12-12T00:01:00.000Z"
36
+ interval: 5
37
+ allow-padding: true
38
+ "group-by":
39
+ path: builtin
40
+ method: GroupBy
41
+ tree:
42
+ children:
43
+ child-1:
44
+ pipeline:
45
+ - teads-curve
46
+ - sci-e
47
+ - sci-m
48
+ - sci-o
49
+ - time-sync
50
+ - sci
51
+ config:
52
+ group-by:
53
+ group:
54
+ - region
55
+ - instance-type
56
+ defaults:
57
+ cpu/thermal-design-power: 100
58
+ grid/carbon-intensity: 800
59
+ device/emissions-embodied: 1533.120 # gCO2eq
60
+ time-reserved: 3600 # 1hr in seconds
61
+ device/expected-lifespan: 94608000 # 3 years in seconds
62
+ resources-reserved: 1
63
+ resources-total: 8
64
+ functional-unit-time: "1 min"
65
+ inputs:
66
+ - timestamp: "2023-12-12T00:00:00.000Z"
67
+ instance-type: A1
68
+ region: uk-west
69
+ duration: 1
70
+ cpu/utilization: 10
71
+ - timestamp: "2023-12-12T00:00:01.000Z"
72
+ duration: 5
73
+ cpu/utilization: 20
74
+ instance-type: A1
75
+ region: uk-west
76
+ - timestamp: "2023-12-12T00:00:06.000Z"
77
+ duration: 7
78
+ cpu/utilization: 15
79
+ instance-type: A1
80
+ region: uk-west
81
+ - timestamp: "2023-12-12T00:00:13.000Z"
82
+ duration: 30
83
+ instance-type: A1
84
+ region: uk-west
85
+ cpu/utilization: 15
86
+ child-2:
87
+ pipeline:
88
+ - teads-curve
89
+ - sci-e
90
+ - sci-m
91
+ - sci-o
92
+ - time-sync
93
+ - sci
94
+ config:
95
+ group-by:
96
+ group:
97
+ - region
98
+ - instance-type
99
+ defaults:
100
+ cpu/thermal-design-power: 100
101
+ grid/carbon-intensity: 800
102
+ device/emissions-embodied: 1533.120 # gCO2eq
103
+ time-reserved: 3600 # 1hr in seconds
104
+ device/expected-lifespan: 94608000 # 3 years in seconds
105
+ resources-reserved: 1
106
+ resources-total: 8
107
+ functional-unit-time: "1 min"
108
+ inputs:
109
+ - timestamp: "2023-12-12T00:00:00.000Z"
110
+ duration: 1
111
+ cpu/utilization: 30
112
+ instance-type: A1
113
+ region: uk-west
114
+ - timestamp: "2023-12-12T00:00:01.000Z"
115
+ duration: 5
116
+ cpu/utilization: 28
117
+ instance-type: A1
118
+ region: uk-west
119
+ - timestamp: "2023-12-12T00:00:06.000Z"
120
+ duration: 7
121
+ cpu/utilization: 40
122
+ instance-type: A1
123
+ region: uk-west
124
+ - timestamp: "2023-12-12T00:00:13.000Z"
125
+ duration: 30
126
+ cpu/utilization: 33
127
+ instance-type: A1
128
+ region: uk-west
@@ -0,0 +1,82 @@
1
+ name: pipeline-teads-sci
2
+ description:
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
+ "sum":
12
+ path: "@grnsft/if-plugins"
13
+ method: Sum
14
+ global-config:
15
+ input-parameters:
16
+ - cpu/energy
17
+ - network/energy
18
+ output-parameter: energy
19
+ "sci-m":
20
+ path: "@grnsft/if-plugins"
21
+ method: SciM
22
+ "sci-o":
23
+ path: "@grnsft/if-plugins"
24
+ method: SciO
25
+ "sci":
26
+ path: "@grnsft/if-plugins"
27
+ method: Sci
28
+ global-config:
29
+ functional-unit: ''
30
+ functional-unit-time: '1-day'
31
+ "time-sync":
32
+ method: TimeSync
33
+ path: "builtin"
34
+ global-config:
35
+ start-time: "2023-12-12T00:00:00.000Z"
36
+ end-time: "2023-12-12T00:01:00.000Z"
37
+ interval: 5
38
+ allow-padding: true
39
+ tree:
40
+ children:
41
+ child-1:
42
+ pipeline:
43
+ - teads-curve
44
+ - sum
45
+ - sci-m
46
+ - sci-o
47
+ - time-sync
48
+ - sci
49
+ config:
50
+ defaults:
51
+ cpu/thermal-design-power: 100
52
+ grid/carbon-intensity: 800
53
+ device/emissions-embodied: 1533.120 # gCO2eq
54
+ time-reserved: 3600 # 1hr in seconds
55
+ device/expected-lifespan: 94608000 # 3 years in seconds
56
+ resources-reserved: 1
57
+ resources-total: 8
58
+ inputs:
59
+ - timestamp: "2023-12-12T00:00:00.000Z"
60
+ instance-type: A1
61
+ region: uk-west
62
+ duration: 1
63
+ cpu/utilization: 50
64
+ network/energy: 0.000001
65
+ - timestamp: "2023-12-12T00:00:01.000Z"
66
+ duration: 5
67
+ cpu/utilization: 20
68
+ instance-type: A1
69
+ region: uk-west
70
+ network/energy: 0.000001
71
+ - timestamp: "2023-12-12T00:00:06.000Z"
72
+ duration: 7
73
+ cpu/utilization: 15
74
+ instance-type: A1
75
+ region: uk-west
76
+ network/energy: 0.000001
77
+ - timestamp: "2023-12-12T00:00:13.000Z"
78
+ duration: 30
79
+ instance-type: A1
80
+ region: uk-west
81
+ cpu/utilization: 15
82
+ network/energy: 0.000001
@@ -0,0 +1,147 @@
1
+ name: pipeline-with-generics-demo
2
+ description:
3
+ tags:
4
+ aggregation:
5
+ metrics:
6
+ - 'carbon'
7
+ type: 'both'
8
+ initialize:
9
+ plugins:
10
+ "teads-curve":
11
+ path: "@grnsft/if-unofficial-plugins"
12
+ method: TeadsCurve
13
+ global-config:
14
+ interpolation: spline
15
+ "sum":
16
+ path: "@grnsft/if-plugins"
17
+ method: Sum
18
+ global-config:
19
+ input-parameters:
20
+ - cpu/energy
21
+ - network/energy
22
+ output-parameter: energy-sum
23
+ "coefficient":
24
+ path: "@grnsft/if-plugins"
25
+ method: Coefficient
26
+ global-config:
27
+ input-parameter: energy
28
+ coefficient: 2
29
+ output-parameter: energy-doubled
30
+ "sci-m":
31
+ path: "@grnsft/if-plugins"
32
+ method: SciM
33
+ "sci-o":
34
+ path: "@grnsft/if-plugins"
35
+ method: SciO
36
+ "sci":
37
+ path: "@grnsft/if-plugins"
38
+ method: Sci
39
+ global-config:
40
+ functional-unit: "requests"
41
+ functional-unit-time: "1 minute"
42
+ "time-sync":
43
+ method: TimeSync
44
+ path: "builtin"
45
+ global-config:
46
+ start-time: "2023-12-12T00:00:00.000Z"
47
+ end-time: "2023-12-12T00:01:00.000Z"
48
+ interval: 5
49
+ allow-padding: true
50
+ tree:
51
+ children:
52
+ child-1:
53
+ pipeline:
54
+ - teads-curve
55
+ - sum
56
+ - sci-m
57
+ - sci-o
58
+ - time-sync
59
+ - coefficient
60
+ - sci
61
+ config:
62
+ defaults:
63
+ cpu/thermal-design-power: 100
64
+ grid/carbon-intensity: 800
65
+ device/emissions-embodied: 1533.120 # gCO2eq
66
+ time-reserved: 3600 # 1hr in seconds
67
+ device/expected-lifespan: 94608000 # 3 years in seconds
68
+ resources-reserved: 1
69
+ resources-total: 8
70
+ functional-unit-time: "1 min"
71
+ inputs:
72
+ - timestamp: "2023-12-12T00:00:00.000Z"
73
+ instance-type: A1
74
+ region: uk-west
75
+ duration: 1
76
+ cpu/utilization: 50
77
+ network/energy: 10
78
+ energy: 5
79
+ - timestamp: "2023-12-12T00:00:01.000Z"
80
+ duration: 5
81
+ cpu/utilization: 20
82
+ instance-type: A1
83
+ region: uk-west
84
+ network/energy: 10
85
+ energy: 5
86
+ - timestamp: "2023-12-12T00:00:06.000Z"
87
+ duration: 7
88
+ cpu/utilization: 15
89
+ instance-type: A1
90
+ region: uk-west
91
+ network/energy: 10
92
+ energy: 5
93
+ - timestamp: "2023-12-12T00:00:13.000Z"
94
+ duration: 30
95
+ instance-type: A1
96
+ region: uk-west
97
+ cpu/utilization: 15
98
+ network/energy: 10
99
+ energy: 5
100
+ child-2:
101
+ pipeline:
102
+ - teads-curve
103
+ - sum
104
+ - sci-m
105
+ - sci-o
106
+ - time-sync
107
+ - coefficient
108
+ - sci
109
+ config:
110
+ defaults:
111
+ cpu/thermal-design-power: 100
112
+ grid/carbon-intensity: 800
113
+ device/emissions-embodied: 1533.120 # gCO2eq
114
+ time-reserved: 3600 # 1hr in seconds
115
+ device/expected-lifespan: 94608000 # 3 years in seconds
116
+ resources-reserved: 1
117
+ resources-total: 8
118
+ functional-unit-time: "1 min"
119
+ inputs:
120
+ - timestamp: "2023-12-12T00:00:00.000Z"
121
+ duration: 1
122
+ cpu/utilization: 30
123
+ instance-type: A1
124
+ region: uk-west
125
+ network/energy: 10
126
+ energy: 5
127
+ - timestamp: "2023-12-12T00:00:01.000Z"
128
+ duration: 5
129
+ cpu/utilization: 28
130
+ instance-type: A1
131
+ region: uk-west
132
+ network/energy: 10
133
+ energy: 5
134
+ - timestamp: "2023-12-12T00:00:06.000Z"
135
+ duration: 7
136
+ cpu/utilization: 40
137
+ instance-type: A1
138
+ region: uk-west
139
+ network/energy: 10
140
+ energy: 5
141
+ - timestamp: "2023-12-12T00:00:13.000Z"
142
+ duration: 30
143
+ cpu/utilization: 33
144
+ instance-type: A1
145
+ region: uk-west
146
+ network/energy: 10
147
+ energy: 5
@@ -0,0 +1,146 @@
1
+ name: pipeline-with-mock-obs-demo
2
+ description:
3
+ tags:
4
+ aggregation:
5
+ metrics:
6
+ - 'carbon'
7
+ type: 'both'
8
+ initialize:
9
+ plugins:
10
+ mock-observations:
11
+ kind: plugin
12
+ method: MockObservations
13
+ path: '@grnsft/if-plugins'
14
+ global-config:
15
+ timestamp-from: 2023-07-06T00:00
16
+ timestamp-to: 2023-07-06T00:10
17
+ duration: 60
18
+ components:
19
+ - instance-type: A1
20
+ generators:
21
+ common:
22
+ region: uk-west
23
+ common-key: common-val
24
+ randint:
25
+ cpu/utilization:
26
+ min: 1
27
+ max: 99
28
+ "teads-curve":
29
+ path: "@grnsft/if-unofficial-plugins"
30
+ method: TeadsCurve
31
+ global-config:
32
+ interpolation: spline
33
+ "sci-e":
34
+ path: "@grnsft/if-plugins"
35
+ method: SciE
36
+ "sci-m":
37
+ path: "@grnsft/if-plugins"
38
+ method: SciM
39
+ "sci-o":
40
+ path: "@grnsft/if-plugins"
41
+ method: SciO
42
+ "sci":
43
+ path: "@grnsft/if-plugins"
44
+ method: Sci
45
+ global-config:
46
+ functional-unit: "requests"
47
+ functional-unit-time: "1 minute"
48
+ "time-sync":
49
+ method: TimeSync
50
+ path: "builtin"
51
+ global-config:
52
+ start-time: "2023-12-12T00:00:00.000Z"
53
+ end-time: "2023-12-12T00:01:00.000Z"
54
+ interval: 5
55
+ allow-padding: true
56
+ 'group-by':
57
+ path: builtin
58
+ method: GroupBy
59
+ tree:
60
+ children:
61
+ child-1:
62
+ pipeline:
63
+ - teads-curve
64
+ - sci-e
65
+ - sci-m
66
+ - sci-o
67
+ - time-sync
68
+ - sci
69
+ config:
70
+ group-by:
71
+ group:
72
+ - region
73
+ - instance-type
74
+ defaults:
75
+ cpu/thermal-design-power: 100
76
+ grid/carbon-intensity: 800
77
+ device/emissions-embodied: 1533.120 # gCO2eq
78
+ time-reserved: 3600 # 1hr in seconds
79
+ device/expected-lifespan: 94608000 # 3 years in seconds
80
+ resources-reserved: 1
81
+ resources-total: 8
82
+ functional-unit-time: "1 min"
83
+ inputs:
84
+ - timestamp: "2023-12-12T00:00:00.000Z"
85
+ instance-type: A1
86
+ region: uk-west
87
+ duration: 1
88
+ cpu/utilization: 10
89
+ - timestamp: "2023-12-12T00:00:01.000Z"
90
+ duration: 5
91
+ cpu/utilization: 20
92
+ instance-type: A1
93
+ region: uk-west
94
+ - timestamp: "2023-12-12T00:00:06.000Z"
95
+ duration: 7
96
+ cpu/utilization: 15
97
+ instance-type: A1
98
+ region: uk-west
99
+ - timestamp: "2023-12-12T00:00:13.000Z"
100
+ duration: 30
101
+ instance-type: A1
102
+ region: uk-west
103
+ cpu/utilization: 15
104
+ child-2:
105
+ pipeline:
106
+ - teads-curve
107
+ - sci-e
108
+ - sci-m
109
+ - sci-o
110
+ - time-sync
111
+ - sci
112
+ config:
113
+ group-by:
114
+ group:
115
+ - region
116
+ - instance-type
117
+ defaults:
118
+ cpu/thermal-design-power: 100
119
+ grid/carbon-intensity: 800
120
+ device/emissions-embodied: 1533.120 # gCO2eq
121
+ time-reserved: 3600 # 1hr in seconds
122
+ device/expected-lifespan: 94608000 # 3 years in seconds
123
+ resources-reserved: 1
124
+ resources-total: 8
125
+ functional-unit-time: "1 min"
126
+ inputs:
127
+ - timestamp: "2023-12-12T00:00:00.000Z"
128
+ duration: 1
129
+ cpu/utilization: 30
130
+ instance-type: A1
131
+ region: uk-west
132
+ - timestamp: "2023-12-12T00:00:01.000Z"
133
+ duration: 5
134
+ cpu/utilization: 28
135
+ instance-type: A1
136
+ region: uk-west
137
+ - timestamp: "2023-12-12T00:00:06.000Z"
138
+ duration: 7
139
+ cpu/utilization: 40
140
+ instance-type: A1
141
+ region: uk-west
142
+ - timestamp: "2023-12-12T00:00:13.000Z"
143
+ duration: 30
144
+ cpu/utilization: 33
145
+ instance-type: A1
146
+ region: uk-west
@@ -2,13 +2,11 @@ name: sci-e-demo
2
2
  description:
3
3
  tags:
4
4
  initialize:
5
- models:
6
- - name: sci-e
7
- kind: plugin
8
- verbose: false
9
- model: SciEModel
10
- path: "@grnsft/if-models"
11
- graph:
5
+ plugins:
6
+ "sci-e":
7
+ method: SciE
8
+ path: "@grnsft/if-plugins"
9
+ tree:
12
10
  children:
13
11
  child:
14
12
  pipeline:
@@ -18,4 +16,4 @@ graph:
18
16
  inputs:
19
17
  - timestamp: 2023-08-06T00:00
20
18
  duration: 3600
21
- energy-cpu: 0.001
19
+ cpu/energy: 0.001
@@ -0,0 +1,23 @@
1
+ name: sci-m
2
+ description: simple demo invoking sci-m
3
+ tags:
4
+ initialize:
5
+ plugins:
6
+ "sci-m": # a model that calculates m from te, tir, el, rr and rtor
7
+ method: SciM
8
+ verbose: false
9
+ path: "@grnsft/if-plugins"
10
+ tree:
11
+ children:
12
+ child:
13
+ pipeline:
14
+ - sci-m # duration & config -> embodied
15
+ defaults:
16
+ device/emissions-embodied: 1533.120 # gCO2eq
17
+ time-reserved: 3600 # 1hr in seconds
18
+ device/expected-lifespan: 94608000 # 3 years in seconds
19
+ resources-reserved: 1
20
+ resources-total: 8
21
+ inputs:
22
+ - timestamp: 2023-07-06T00:00
23
+ duration: 3600