@grnsft/if 0.1.6 → 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 (46) hide show
  1. package/CONTRIBUTING.md +1 -1
  2. package/README.md +1 -34
  3. package/build/index.js +2 -2
  4. package/coverage/clover.xml +379 -0
  5. package/coverage/coverage-final.json +14 -0
  6. package/coverage/lcov-report/base.css +224 -0
  7. package/coverage/lcov-report/block-navigation.js +87 -0
  8. package/coverage/lcov-report/config/config.ts.html +250 -0
  9. package/coverage/lcov-report/config/index.html +146 -0
  10. package/coverage/lcov-report/config/index.ts.html +91 -0
  11. package/coverage/lcov-report/config/strings.ts.html +208 -0
  12. package/coverage/lcov-report/favicon.png +0 -0
  13. package/coverage/lcov-report/index.html +161 -0
  14. package/coverage/lcov-report/lib/index.html +161 -0
  15. package/coverage/lcov-report/lib/models-universe.ts.html +517 -0
  16. package/coverage/lcov-report/lib/observatory.ts.html +187 -0
  17. package/coverage/lcov-report/lib/planet-aggregator.ts.html +274 -0
  18. package/coverage/lcov-report/lib/supercomputer.ts.html +472 -0
  19. package/coverage/lcov-report/models/index.html +131 -0
  20. package/coverage/lcov-report/models/index.ts.html +88 -0
  21. package/coverage/lcov-report/models/planet-aggregator.ts.html +271 -0
  22. package/coverage/lcov-report/models/time-sync.ts.html +1165 -0
  23. package/coverage/lcov-report/prettify.css +1 -0
  24. package/coverage/lcov-report/prettify.js +2 -0
  25. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  26. package/coverage/lcov-report/sorter.js +196 -0
  27. package/coverage/lcov-report/util/args.ts.html +289 -0
  28. package/coverage/lcov-report/util/errors.ts.html +166 -0
  29. package/coverage/lcov-report/util/index.html +161 -0
  30. package/coverage/lcov-report/util/units-dealer.ts.html +199 -0
  31. package/coverage/lcov-report/util/yaml.ts.html +193 -0
  32. package/coverage/lcov.info +637 -0
  33. package/examples/impls/test/aggregation-test.yml +2 -2
  34. package/examples/impls/test/e-net.yml +21 -0
  35. package/examples/impls/test/nesting.yml +93 -42
  36. package/examples/impls/test/sci.yml +3 -3
  37. package/examples/impls/test/shell.yml +5 -5
  38. package/examples/ompls/nesting.yml +91 -85
  39. package/examples/ompls/sci.yml +4 -3
  40. package/examples/ompls/shell.yml +7 -7
  41. package/grafana/IF_GRAFANA_SETUP.md +71 -0
  42. package/grafana/if_grafana_config.json +370 -0
  43. package/jest.config.js +1 -1
  44. package/package.json +2 -3
  45. package/src/config/units.yaml +1 -1
  46. package/examples/ompls/test/time-sync.yml +0 -255
@@ -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
+
@@ -0,0 +1,71 @@
1
+ # Setting up the Impact Framework Grafana dashboard
2
+ (for any questions please contact paz.barda@intel.com / pazbarda@gmail.com)
3
+
4
+ ## Download and Install Grafana
5
+ https://grafana.com/get/?plcmt=top-nav&cta=downloads&tab=self-managed
6
+
7
+ This is the self managed version: you install it and can run it on your local machine.
8
+
9
+ ## Open Grafana on your local machine
10
+ Web browser: localhost:3000
11
+
12
+ You should see the Grafana welcome page.
13
+
14
+ ## Download and Install Grafana CSV plugin
15
+ https://grafana.com/grafana/plugins/marcusolsson-csv-datasource/?tab=installation
16
+
17
+ After installation, go to Menu -> Plugins, search for "CSV" and make sure CSV plugin is there
18
+
19
+ ## Import the dashboard json config
20
+
21
+ Menu -> Dashboards -> New -> Import
22
+
23
+ 1. Drag and drop "grafana_config.json" from this folder to Grafana webpage
24
+ 2. Optional - change the name of the dashboard and the details text on the right
25
+ 3. Click import.
26
+
27
+ Dashboard should now appear, but with no data fed into the charts (yet).
28
+
29
+ ## Create a data source for your OMPL CSV file
30
+ Menu -> Connections -> Data Sources -> Add data source
31
+
32
+ 1. Search for "CSV", you should see the CSV plugin. Click it.
33
+ 2. Name you new data source.
34
+ 3. Switch from "HTTP" to "Local".
35
+ 4. Type/paste in the path to your ompl csv ("your/path/to/csvs/if-iee-demo.csv" in our example)
36
+
37
+ Click Save & Test
38
+
39
+
40
+
41
+ ## Connect your OMPL CSV data source to your dashboard
42
+
43
+ Menu -> Dashboards -> Select your new dashboard
44
+
45
+ For each blank chart:
46
+
47
+ 1. Click the chart menu -> edit
48
+ 2. Below the chart go to Quary tab
49
+ 3. At the top of the tab select the ompl CSV datasource you created
50
+ 4. Go to Transform tab, and select the fields you'd like to show on the chart.
51
+ 5. Start with "timestamp" and convert it to "Time".
52
+ 6. Any other numeric value you'd like to show should be converted to "Number"
53
+
54
+ Click Apply
55
+
56
+ Click Save
57
+
58
+ NOTE: when you select a CSV file (step 3) it might initially not show the columns in the transformation dropdown. if that happens - save the dashboard, exit it refresh the Grafana webpage (localhost:3000). Once you go into the dashboard again it should show the columns for transformation.
59
+
60
+
61
+ ## Enable auto-refresh of the dashboard
62
+
63
+ On the top right of the dashboard, look for the "refresh dashboard" button
64
+
65
+ Click the dropdown next to it, and choose the auto-refresh interval
66
+
67
+ Click Save
68
+
69
+ ## Your dashboard is now ready to go!
70
+ With every change to you CSV file you should see it reflect on the dashboard momentarily.
71
+