@grnsft/if 0.3.4 → 0.4.0-beta.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 (82) hide show
  1. package/.commitlintrc.js +0 -1
  2. package/.lintstagedrc.js +6 -0
  3. package/README.md +12 -8
  4. package/Refactor-migration-guide.md +6 -6
  5. package/github-processes.md +16 -42
  6. package/manifests/bugs/aggregation-error-wrong-metric.yml +6 -6
  7. package/manifests/bugs/azure-importer-ignoring-defaults.yml +3 -3
  8. package/manifests/bugs/azure-importer-incorrect-calculation.yml +2 -2
  9. package/manifests/bugs/mock-observations-failure-duration-is-zero.yml +34 -0
  10. package/manifests/bugs/pipeline-error-uninitialized-plugin.yml +1 -1
  11. package/manifests/bugs/pipeline-ordering-error.yml +6 -6
  12. package/manifests/bugs/sci-embodied-missing-resources-total.yml +23 -0
  13. package/manifests/examples/generics.yml +3 -3
  14. package/manifests/examples/instance-metadata.yml +36 -0
  15. package/manifests/examples/mock-cpu-util-to-carbon.yml +3 -3
  16. package/manifests/examples/nesting.yml +37 -10
  17. package/manifests/examples/pipeline-teads-sci.yml +17 -9
  18. package/manifests/examples/pipeline-with-aggregate.yml +24 -9
  19. package/manifests/examples/pipeline-with-mocks.yml +26 -9
  20. package/manifests/examples/sci.yml +131 -0
  21. package/manifests/examples/teads-curve.yml +78 -0
  22. package/manifests/features/aggregate-failure-inalid-metrics.yml +43 -0
  23. package/manifests/features/aggregate-failure-missing-metric-in-inputs.yml +43 -0
  24. package/manifests/integrations/cloud-metadata-divide-boavizta.yml +1 -1
  25. package/manifests/integrations/mock-obs-group-by-cloud-meta.yml +51 -0
  26. package/manifests/integrations/mock-obs-groupby.yml +2 -2
  27. package/manifests/integrations/mock-obs-time-sync.yml +1 -1
  28. package/manifests/plugins/cloud-metadata/failure-invalid-instance-type.yaml +21 -0
  29. package/manifests/plugins/cloud-metadata/failure-invalid-vendor.yaml +1 -1
  30. package/manifests/plugins/cloud-metadata/failure-missing-cloud-vendor.yml +21 -0
  31. package/manifests/plugins/cloud-metadata/success.yml +1 -1
  32. package/manifests/plugins/coefficient/failure-invalid-config-input-param.yml +1 -1
  33. package/manifests/plugins/coefficient/failure-output-param-is-null.yaml +24 -0
  34. package/manifests/plugins/coefficient/success.yml +1 -1
  35. package/manifests/plugins/csv-lookup/failure-missing-column.yml +26 -0
  36. package/manifests/plugins/csv-lookup/failure-missing-output.yml +26 -0
  37. package/manifests/plugins/csv-lookup/success-renaming.yml +26 -0
  38. package/manifests/plugins/csv-lookup/success.yml +26 -0
  39. package/manifests/plugins/divide/failure-denominator-equal-zero.yml +39 -0
  40. package/manifests/plugins/divide/failure-invalid-config-denominator.yml +1 -1
  41. package/manifests/plugins/divide/failure-missing-numerator.yml +39 -0
  42. package/manifests/plugins/divide/success.yml +2 -2
  43. package/manifests/plugins/groupby/failure-missing-cloud-instance-type.yml +49 -0
  44. package/manifests/plugins/interpolation/interpolation.yml +24 -0
  45. package/manifests/plugins/mock-observations/failure-invalid-config-cpu-range.yml +1 -1
  46. package/manifests/plugins/mock-observations/failure-invalid-memory-utilization-range.yml +34 -0
  47. package/manifests/plugins/mock-observations/failure-missing-timestamp-from-param.yml +34 -0
  48. package/manifests/plugins/mock-observations/success.yml +2 -2
  49. package/manifests/plugins/multiply/failure-input-parameter-is-missing.yml +1 -1
  50. package/manifests/plugins/multiply/success-with-multiple-inputs.yml +32 -0
  51. package/manifests/plugins/multiply/success.yml +3 -3
  52. package/manifests/plugins/regex/failure-missing-input-param.yml +1 -1
  53. package/manifests/plugins/regex/failure-not-matching-with-regex.yml +24 -0
  54. package/manifests/plugins/regex/success.yml +2 -2
  55. package/manifests/plugins/sci/failure-invalid-config-value.yml +2 -3
  56. package/manifests/plugins/sci/failure-missing-input-param.yml +27 -0
  57. package/manifests/plugins/sci/success.yml +5 -4
  58. package/manifests/plugins/{sci-m → sci-embodied}/failure-invalid-default-emission-value.yml +5 -6
  59. package/manifests/plugins/sci-embodied/failure-missing-expected-lifespan.yml +23 -0
  60. package/manifests/plugins/{sci-m → sci-embodied}/success.yml +5 -6
  61. package/manifests/plugins/shell/failure-invalid-command.yml +1 -1
  62. package/manifests/plugins/shell/success.yml +1 -2
  63. package/manifests/plugins/sum/failure-missing-input-param.yml +1 -1
  64. package/manifests/plugins/sum/failure-missing-output-param.yml +28 -0
  65. package/manifests/plugins/sum/success.yml +1 -1
  66. package/manifests/plugins/tdp-finder/failure-unsupported-physical-processor.yml +19 -0
  67. package/manifests/plugins/time-sync/failure-missing-global-config.yml +34 -0
  68. package/package.json +10 -2
  69. package/src/builtins/README.md +5 -5
  70. package/src/builtins/coefficient/README.md +92 -0
  71. package/src/builtins/csv-lookup/README.md +142 -0
  72. package/src/builtins/divide/README.md +95 -0
  73. package/src/builtins/exponent/README.md +97 -0
  74. package/src/builtins/interpolation/README.md +168 -0
  75. package/src/builtins/mock-observations/README.md +97 -0
  76. package/src/builtins/multiply/README.md +94 -0
  77. package/src/builtins/regex/README.md +91 -0
  78. package/src/builtins/sci/README.md +89 -0
  79. package/src/builtins/sci-embodied/README.md +110 -0
  80. package/src/builtins/shell/README.md +130 -0
  81. package/src/builtins/subtract/README.md +94 -0
  82. package/src/builtins/sum/README.md +91 -0
@@ -9,25 +9,32 @@ initialize:
9
9
  global-config:
10
10
  interpolation: spline
11
11
  "sum":
12
- path: "@grnsft/if-plugins"
12
+ path: "builtin"
13
13
  method: Sum
14
14
  global-config:
15
15
  input-parameters:
16
16
  - cpu/energy
17
17
  - network/energy
18
18
  output-parameter: energy
19
- "sci-m":
20
- path: "@grnsft/if-plugins"
21
- method: SciM
19
+ "sci-embodied":
20
+ path: "builtin"
21
+ method: SciEmbodied
22
22
  "sci-o":
23
23
  path: "@grnsft/if-plugins"
24
24
  method: SciO
25
25
  "sci":
26
- path: "@grnsft/if-plugins"
26
+ path: "builtin"
27
27
  method: Sci
28
28
  global-config:
29
- functional-unit: ""
30
- functional-unit-time: "1-day"
29
+ functional-unit: "component"
30
+ "sum-carbon":
31
+ path: "builtin"
32
+ method: Sum
33
+ global-config:
34
+ input-parameters:
35
+ - carbon-operational
36
+ - carbon-embodied
37
+ output-parameter: carbon
31
38
  "time-sync":
32
39
  method: TimeSync
33
40
  path: "builtin"
@@ -42,9 +49,9 @@ tree:
42
49
  pipeline:
43
50
  - teads-curve
44
51
  - sum
45
- - sci-m
52
+ - sci-embodied
46
53
  - sci-o
47
- - time-sync
54
+ - sum-carbon
48
55
  - sci
49
56
  config:
50
57
  defaults:
@@ -55,6 +62,7 @@ tree:
55
62
  device/expected-lifespan: 94608000 # 3 years in seconds
56
63
  resources-reserved: 1
57
64
  resources-total: 8
65
+ component: 1
58
66
  inputs:
59
67
  - timestamp: "2023-12-12T00:00:00.000Z"
60
68
  cloud/instance-type: A1
@@ -15,18 +15,25 @@ initialize:
15
15
  "sci-e":
16
16
  path: "@grnsft/if-plugins"
17
17
  method: SciE
18
- "sci-m":
19
- path: "@grnsft/if-plugins"
20
- method: SciM
18
+ "sci-embodied":
19
+ path: "builtin"
20
+ method: SciEmbodied
21
21
  "sci-o":
22
22
  path: "@grnsft/if-plugins"
23
23
  method: SciO
24
24
  "sci":
25
- path: "@grnsft/if-plugins"
25
+ path: "builtin"
26
26
  method: Sci
27
27
  global-config:
28
28
  functional-unit: "requests"
29
- functional-unit-time: "1 minute"
29
+ "sum-carbon":
30
+ path: "builtin"
31
+ method: Sum
32
+ global-config:
33
+ input-parameters:
34
+ - carbon-operational
35
+ - carbon-embodied
36
+ output-parameter: carbon
30
37
  "time-sync":
31
38
  method: TimeSync
32
39
  path: "builtin"
@@ -44,8 +51,9 @@ tree:
44
51
  pipeline:
45
52
  - teads-curve
46
53
  - sci-e
47
- - sci-m
54
+ - sci-embodied
48
55
  - sci-o
56
+ - sum-carbon
49
57
  - time-sync
50
58
  - sci
51
59
  config:
@@ -61,34 +69,38 @@ tree:
61
69
  device/expected-lifespan: 94608000 # 3 years in seconds
62
70
  resources-reserved: 1
63
71
  resources-total: 8
64
- functional-unit-time: "1 min"
65
72
  inputs:
66
73
  - timestamp: "2023-12-12T00:00:00.000Z"
67
74
  cloud/instance-type: A1
68
75
  cloud/region: uk-west
69
76
  duration: 1
70
77
  cpu/utilization: 10
78
+ requests: 10
71
79
  - timestamp: "2023-12-12T00:00:01.000Z"
72
80
  duration: 5
73
81
  cpu/utilization: 20
74
82
  cloud/instance-type: A1
75
83
  cloud/region: uk-west
84
+ requests: 5
76
85
  - timestamp: "2023-12-12T00:00:06.000Z"
77
86
  duration: 7
78
87
  cpu/utilization: 15
79
88
  cloud/instance-type: A1
80
89
  cloud/region: uk-west
90
+ requests: 15
81
91
  - timestamp: "2023-12-12T00:00:13.000Z"
82
92
  duration: 30
83
93
  cloud/instance-type: A1
84
94
  cloud/region: uk-west
85
95
  cpu/utilization: 15
96
+ requests: 30
86
97
  child-2:
87
98
  pipeline:
88
99
  - teads-curve
89
100
  - sci-e
90
- - sci-m
101
+ - sci-embodied
91
102
  - sci-o
103
+ - sum-carbon
92
104
  - time-sync
93
105
  - sci
94
106
  config:
@@ -104,25 +116,28 @@ tree:
104
116
  device/expected-lifespan: 94608000 # 3 years in seconds
105
117
  resources-reserved: 1
106
118
  resources-total: 8
107
- functional-unit-time: "1 min"
108
119
  inputs:
109
120
  - timestamp: "2023-12-12T00:00:00.000Z"
110
121
  duration: 1
111
122
  cpu/utilization: 30
112
123
  cloud/instance-type: A1
113
124
  cloud/region: uk-west
125
+ requests: 100
114
126
  - timestamp: "2023-12-12T00:00:01.000Z"
115
127
  duration: 5
116
128
  cpu/utilization: 28
117
129
  cloud/instance-type: A1
118
130
  cloud/region: uk-west
131
+ requests: 150
119
132
  - timestamp: "2023-12-12T00:00:06.000Z"
120
133
  duration: 7
121
134
  cpu/utilization: 40
122
135
  cloud/instance-type: A1
123
136
  cloud/region: uk-west
137
+ requests: 110
124
138
  - timestamp: "2023-12-12T00:00:13.000Z"
125
139
  duration: 30
126
140
  cpu/utilization: 33
127
141
  cloud/instance-type: A1
128
142
  cloud/region: uk-west
143
+ requests: 180
@@ -10,7 +10,7 @@ initialize:
10
10
  mock-observations:
11
11
  kind: plugin
12
12
  method: MockObservations
13
- path: "@grnsft/if-plugins"
13
+ path: "builtin"
14
14
  global-config:
15
15
  timestamp-from: 2023-07-06T00:00
16
16
  timestamp-to: 2023-07-06T00:10
@@ -33,18 +33,25 @@ initialize:
33
33
  "sci-e":
34
34
  path: "@grnsft/if-plugins"
35
35
  method: SciE
36
- "sci-m":
37
- path: "@grnsft/if-plugins"
38
- method: SciM
36
+ "sci-embodied":
37
+ path: "builtin"
38
+ method: SciEmbodied
39
39
  "sci-o":
40
40
  path: "@grnsft/if-plugins"
41
41
  method: SciO
42
+ "sum-carbon":
43
+ path: "builtin"
44
+ method: Sum
45
+ global-config:
46
+ input-parameters:
47
+ - carbon-operational
48
+ - carbon-embodied
49
+ output-parameter: carbon
42
50
  "sci":
43
- path: "@grnsft/if-plugins"
51
+ path: "builtin"
44
52
  method: Sci
45
53
  global-config:
46
54
  functional-unit: "requests"
47
- functional-unit-time: "1 minute"
48
55
  "time-sync":
49
56
  method: TimeSync
50
57
  path: "builtin"
@@ -56,15 +63,16 @@ initialize:
56
63
  "group-by":
57
64
  path: builtin
58
65
  method: GroupBy
59
- outputs: ['yaml']
66
+ # outputs: ['yaml']
60
67
  tree:
61
68
  children:
62
69
  child-1:
63
70
  pipeline:
64
71
  - teads-curve
65
72
  - sci-e
66
- - sci-m
73
+ - sci-embodied
67
74
  - sci-o
75
+ - sum-carbon
68
76
  - time-sync
69
77
  - sci
70
78
  config:
@@ -87,27 +95,32 @@ tree:
87
95
  cloud/region: uk-west
88
96
  duration: 1
89
97
  cpu/utilization: 10
98
+ requests: 30
90
99
  - timestamp: "2023-12-12T00:00:01.000Z"
91
100
  duration: 5
92
101
  cpu/utilization: 20
93
102
  cloud/instance-type: A1
94
103
  cloud/region: uk-west
104
+ requests: 40
95
105
  - timestamp: "2023-12-12T00:00:06.000Z"
96
106
  duration: 7
97
107
  cpu/utilization: 15
98
108
  cloud/instance-type: A1
99
109
  cloud/region: uk-west
110
+ requests: 30
100
111
  - timestamp: "2023-12-12T00:00:13.000Z"
101
112
  duration: 30
102
113
  cloud/instance-type: A1
103
114
  cloud/region: uk-west
104
115
  cpu/utilization: 15
116
+ requests: 50
105
117
  child-2:
106
118
  pipeline:
107
119
  - teads-curve
108
120
  - sci-e
109
- - sci-m
121
+ - sci-embodied
110
122
  - sci-o
123
+ - sum-carbon
111
124
  - time-sync
112
125
  - sci
113
126
  config:
@@ -130,18 +143,22 @@ tree:
130
143
  cpu/utilization: 30
131
144
  cloud/instance-type: A1
132
145
  cloud/region: uk-west
146
+ requests: 30
133
147
  - timestamp: "2023-12-12T00:00:01.000Z"
134
148
  duration: 5
135
149
  cpu/utilization: 28
136
150
  cloud/instance-type: A1
137
151
  cloud/region: uk-west
152
+ requests: 40
138
153
  - timestamp: "2023-12-12T00:00:06.000Z"
139
154
  duration: 7
140
155
  cpu/utilization: 40
141
156
  cloud/instance-type: A1
142
157
  cloud/region: uk-west
158
+ requests: 50
143
159
  - timestamp: "2023-12-12T00:00:13.000Z"
144
160
  duration: 30
145
161
  cpu/utilization: 33
146
162
  cloud/instance-type: A1
147
163
  cloud/region: uk-west
164
+ requests: 60
@@ -0,0 +1,131 @@
1
+ name: pipeline-teads-sci
2
+ description: a full pipeline seeded with some hardcoded input data and yielding an SCI score
3
+ tags:
4
+ initialize:
5
+ plugins:
6
+ interpolate:
7
+ method: Interpolation
8
+ path: 'builtin'
9
+ global-config:
10
+ method: linear
11
+ x: [0, 10, 50, 100]
12
+ y: [0.12, 0.32, 0.75, 1.02]
13
+ input-parameter: 'cpu/utilization'
14
+ output-parameter: 'cpu-factor'
15
+ cpu-factor-to-wattage:
16
+ method: Multiply
17
+ path: builtin
18
+ global-config:
19
+ input-parameters: ["cpu-factor", "cpu/thermal-design-power"]
20
+ output-parameter: "cpu-wattage"
21
+ wattage-times-duration:
22
+ method: Multiply
23
+ path: builtin
24
+ global-config:
25
+ input-parameters: ["cpu-wattage", "duration"]
26
+ output-parameter: "cpu-wattage-times-duration"
27
+ wattage-to-energy-kwh:
28
+ method: Divide
29
+ path: "builtin"
30
+ global-config:
31
+ numerator: cpu-wattage-times-duration
32
+ denominator: 3600000
33
+ output: cpu-energy-raw
34
+ calculate-vcpu-ratio:
35
+ method: Divide
36
+ path: "builtin"
37
+ global-config:
38
+ numerator: vcpus-total
39
+ denominator: vcpus-allocated
40
+ output: vcpu-ratio
41
+ correct-cpu-energy-for-vcpu-ratio:
42
+ method: Divide
43
+ path: "builtin"
44
+ global-config:
45
+ numerator: cpu-energy-raw
46
+ denominator: vcpu-ratio
47
+ output: cpu/energy
48
+ sum-energy-components:
49
+ path: "builtin"
50
+ method: Sum
51
+ global-config:
52
+ input-parameters:
53
+ - cpu/energy
54
+ - network/energy
55
+ output-parameter: energy
56
+ "embodied-carbon":
57
+ path: "builtin"
58
+ method: SciEmbodied
59
+ "operational-carbon":
60
+ method: Multiply
61
+ path: builtin
62
+ global-config:
63
+ input-parameters: ["energy", "grid/carbon-intensity"]
64
+ output-parameter: "carbon-operational"
65
+ "sum-carbon":
66
+ path: "builtin"
67
+ method: Sum
68
+ global-config:
69
+ input-parameters:
70
+ - carbon-operational
71
+ - carbon-embodied
72
+ output-parameter: carbon
73
+ "sci":
74
+ path: "builtin"
75
+ method: Sci
76
+ global-config:
77
+ functional-unit: "component"
78
+ outputs:
79
+ - yaml
80
+ tree:
81
+ children:
82
+ child-1:
83
+ pipeline:
84
+ - interpolate
85
+ - cpu-factor-to-wattage
86
+ - wattage-times-duration
87
+ - wattage-to-energy-kwh
88
+ - calculate-vcpu-ratio
89
+ - correct-cpu-energy-for-vcpu-ratio
90
+ - sum-energy-components
91
+ - embodied-carbon
92
+ - operational-carbon
93
+ - sum-carbon
94
+ - sci
95
+ config:
96
+ defaults:
97
+ cpu/thermal-design-power: 100
98
+ vcpus-total: 8
99
+ vcpus-allocated: 2
100
+ grid/carbon-intensity: 800
101
+ device/emissions-embodied: 1533.120 # gCO2eq
102
+ time-reserved: 3600 # 1hr in seconds
103
+ device/expected-lifespan: 94608000 # 3 years in seconds
104
+ resources-reserved: vcpus-allocated
105
+ resources-total: vcpus-total
106
+ component: 1
107
+ inputs:
108
+ - timestamp: "2023-12-12T00:00:00.000Z"
109
+ cloud/instance-type: A1
110
+ cloud/region: uk-west
111
+ duration: 1
112
+ cpu/utilization: 50
113
+ network/energy: 0.000001
114
+ - timestamp: "2023-12-12T00:00:01.000Z"
115
+ duration: 5
116
+ cpu/utilization: 20
117
+ cloud/instance-type: A1
118
+ cloud/region: uk-west
119
+ network/energy: 0.000001
120
+ - timestamp: "2023-12-12T00:00:06.000Z"
121
+ duration: 7
122
+ cpu/utilization: 15
123
+ cloud/instance-type: A1
124
+ cloud/region: uk-west
125
+ network/energy: 0.000001
126
+ - timestamp: "2023-12-12T00:00:13.000Z"
127
+ duration: 30
128
+ cloud/instance-type: A1
129
+ cloud/region: uk-west
130
+ cpu/utilization: 15
131
+ network/energy: 0.000001
@@ -0,0 +1,78 @@
1
+ name: carbon-intensity plugin demo
2
+ description:
3
+ tags:
4
+ initialize:
5
+ plugins:
6
+ interpolate:
7
+ method: Interpolation
8
+ path: 'builtin'
9
+ global-config:
10
+ method: linear
11
+ x: [0, 10, 50, 100]
12
+ y: [0.12, 0.32, 0.75, 1.02]
13
+ input-parameter: 'cpu/utilization'
14
+ output-parameter: 'cpu-factor'
15
+ cpu-factor-to-wattage:
16
+ method: Multiply
17
+ path: builtin
18
+ global-config:
19
+ input-parameters: ["cpu-factor", "thermal-design-power"]
20
+ output-parameter: "cpu-wattage"
21
+ wattage-times-duration:
22
+ method: Multiply
23
+ path: builtin
24
+ global-config:
25
+ input-parameters: ["cpu-wattage", "duration"]
26
+ output-parameter: "cpu-wattage-times-duration"
27
+ wattage-to-energy-kwh:
28
+ method: Divide
29
+ path: "builtin"
30
+ global-config:
31
+ numerator: cpu-wattage-times-duration
32
+ denominator: 3600000
33
+ output: cpu-energy-raw
34
+ calculate-vcpu-ratio:
35
+ method: Divide
36
+ path: "builtin"
37
+ global-config:
38
+ numerator: vcpus-total
39
+ denominator: vcpus-allocated
40
+ output: vcpu-ratio
41
+ correct-cpu-energy-for-vcpu-ratio:
42
+ method: Divide
43
+ path: "builtin"
44
+ global-config:
45
+ numerator: cpu-energy-raw
46
+ denominator: vcpu-ratio
47
+ output: cpu-energy-kwh
48
+ tree:
49
+ children:
50
+ child:
51
+ pipeline:
52
+ - interpolate
53
+ - cpu-factor-to-wattage
54
+ - wattage-times-duration
55
+ - wattage-to-energy-kwh
56
+ - calculate-vcpu-ratio
57
+ - correct-cpu-energy-for-vcpu-ratio
58
+ defaults:
59
+ thermal-design-power: 100
60
+ vcpus-total: 8
61
+ vcpus-allocated: 2
62
+ inputs:
63
+ - timestamp: 2023-08-06T00:00
64
+ duration: 360
65
+ cpu/utilization: 1
66
+ carbon: 30
67
+ - timestamp: 2023-09-06T00:00
68
+ duration: 360
69
+ carbon: 30
70
+ cpu/utilization: 10
71
+ - timestamp: 2023-10-06T00:00
72
+ duration: 360
73
+ carbon: 30
74
+ cpu/utilization: 50
75
+ - timestamp: 2023-10-06T00:00
76
+ duration: 360
77
+ carbon: 30
78
+ cpu/utilization: 100
@@ -0,0 +1,43 @@
1
+ name: Aggregation
2
+ description: Apply both `horizontal` and `vertical` aggregations
3
+ aggregation:
4
+ metrics:
5
+ - 'test'
6
+ type: 'both'
7
+ initialize:
8
+ plugins:
9
+ cloud-metadata:
10
+ method: CloudMetadata
11
+ path: "@grnsft/if-plugins"
12
+ tree:
13
+ children:
14
+ application:
15
+ pipeline:
16
+ - cloud-metadata
17
+ children:
18
+ uk-west:
19
+ children:
20
+ server-1:
21
+ inputs:
22
+ - timestamp: '2024-02-26 00:00:00'
23
+ duration: 300
24
+ cloud/instance-type: m5n.large
25
+ cloud/vendor: aws
26
+ cpu/utilization: 89
27
+ - timestamp: '2024-02-26 00:05:00'
28
+ duration: 300
29
+ cloud/instance-type: m5n.large
30
+ cloud/vendor: aws
31
+ cpu/utilization: 59
32
+ server-2:
33
+ inputs:
34
+ - timestamp: '2024-02-26 00:00:00'
35
+ duration: 300
36
+ cloud/instance-type: m5n.large
37
+ cloud/vendor: aws
38
+ cpu/utilization: 24
39
+ - timestamp: '2024-02-26 00:05:00'
40
+ duration: 300
41
+ cloud/instance-type: m5n.large
42
+ cloud/vendor: aws
43
+ cpu/utilization: 27
@@ -0,0 +1,43 @@
1
+ name: Aggregation
2
+ description: Apply both `horizontal` and `vertical` aggregations
3
+ aggregation:
4
+ metrics:
5
+ - 'cpu/utilization'
6
+ type: 'both'
7
+ initialize:
8
+ plugins:
9
+ cloud-metadata:
10
+ method: CloudMetadata
11
+ path: "@grnsft/if-plugins"
12
+ tree:
13
+ children:
14
+ application:
15
+ pipeline:
16
+ - cloud-metadata
17
+ children:
18
+ uk-west:
19
+ children:
20
+ server-1:
21
+ inputs:
22
+ - timestamp: '2024-01-26 00:00:00'
23
+ duration: 300
24
+ cloud/instance-type: m5n.large
25
+ cloud/vendor: aws
26
+ cpu/utilization: 89
27
+ - timestamp: '2024-02-26 00:05:00'
28
+ duration: 300
29
+ cloud/instance-type: m5n.large
30
+ cloud/vendor: aws
31
+ cpu/utilization: 59
32
+ server-2:
33
+ inputs:
34
+ - timestamp: '2024-02-26 00:00:00'
35
+ duration: 300
36
+ cloud/instance-type: m5n.large
37
+ cloud/vendor: aws
38
+ # cpu/utilization: 110
39
+ - timestamp: '2024-02-26 00:15:00'
40
+ duration: 300
41
+ cloud/instance-type: m5n.large
42
+ cloud/vendor: aws
43
+ cpu/utilization: 27
@@ -8,7 +8,7 @@ initialize:
8
8
  path: "@grnsft/if-plugins"
9
9
  divide:
10
10
  method: Divide
11
- path: "@grnsft/if-plugins"
11
+ path: "builtin"
12
12
  global-config:
13
13
  numerator: vcpus-allocated
14
14
  denominator: 2
@@ -0,0 +1,51 @@
1
+ name: My Manifest File
2
+ description: integration of mock observations, group by and cloud metadata
3
+ aggregation:
4
+ metrics:
5
+ - 'cpu/utilization'
6
+ type: 'both'
7
+ initialize:
8
+ # outputs: ['yaml']
9
+ plugins:
10
+ group-by:
11
+ path: 'builtin'
12
+ method: GroupBy
13
+ global-config:
14
+ input-parameters: ['cpu/energy', 'grid/carbon-intensity']
15
+ output-parameter: 'carbon'
16
+ cloud-metadata:
17
+ method: CloudMetadata
18
+ path: "@grnsft/if-plugins"
19
+ mock-observations:
20
+ path: 'builtin'
21
+ method: MockObservations
22
+ global-config:
23
+ timestamp-from: 2024-03-05T00:00
24
+ timestamp-to: 2024-03-05T01:00
25
+ duration: 300
26
+ components:
27
+ - name: server-1
28
+ cloud/instance-type: Standard_E64_v3
29
+ cloud/region: eastus
30
+ - name: server-2
31
+ cloud/instance-type: Standard_E64_v3
32
+ cloud/region: france
33
+ generators:
34
+ common:
35
+ geolocation: 37.7749,-122.4194
36
+ cloud/vendor: azure
37
+ randint:
38
+ cpu/utilization:
39
+ min: 1
40
+ max: 99
41
+ tree:
42
+ pipeline:
43
+ - mock-observations
44
+ - group-by
45
+ - cloud-metadata
46
+ config:
47
+ group-by:
48
+ group:
49
+ - name
50
+ - cloud/instance-type
51
+ inputs: null
@@ -3,7 +3,7 @@ description: Integration of `mock observations` + `groupby plugins`
3
3
  initialize:
4
4
  plugins:
5
5
  mock-observations:
6
- path: '@grnsft/if-plugins'
6
+ path: 'builtin'
7
7
  method: MockObservations
8
8
  global-config:
9
9
  timestamp-from: '2024-03-05T00:00:00.000Z'
@@ -36,4 +36,4 @@ tree:
36
36
  group:
37
37
  - cloud/region
38
38
  - name
39
- inputs: null
39
+ inputs: null
@@ -6,7 +6,7 @@ initialize:
6
6
  mock-observations:
7
7
  kind: plugin
8
8
  method: MockObservations
9
- path: "@grnsft/if-plugins"
9
+ path: "builtin"
10
10
  global-config:
11
11
  timestamp-from: 2023-07-06T00:00
12
12
  timestamp-to: 2023-07-06T00:10
@@ -0,0 +1,21 @@
1
+ name: cloud-metadata
2
+ description: cloud/instance-type instance type is not supported in the cloud vendor
3
+ tags:
4
+ initialize:
5
+ outputs: ['yaml']
6
+ plugins:
7
+ cloud-metadata:
8
+ method: CloudMetadata
9
+ path: "@grnsft/if-plugins"
10
+ tree:
11
+ children:
12
+ child:
13
+ pipeline:
14
+ - cloud-metadata
15
+ config:
16
+ inputs:
17
+ - timestamp: 2023-07-06T00:00 # [KEYWORD] [NO-SUBFIELDS] time when measurement occurred
18
+ cloud/vendor: aws
19
+ cloud/instance-type: m6
20
+ duration: 100
21
+ cpu/utilization: 10