Skip to content

Commit f6b58b7

Browse files
Merge pull request #945 from Green-Software-Foundation/time-sync-aggregation
Time sync aggregation parameters resolution
2 parents eef1183 + 50dfb9e commit f6b58b7

File tree

8 files changed

+25
-424
lines changed

8 files changed

+25
-424
lines changed

manifests/examples/pipelines/outputs-if-diff/pipeline-with-mocks.yaml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,6 @@ initialize:
261261
unit: none
262262
description: Synced time
263263
aggregation-method: none
264-
group-by:
265-
path: builtin
266-
method: GroupBy
267-
parameter-metadata:
268-
inputs:
269-
group:
270-
unit: none
271-
description: Group by fields
272-
aggregation-method: none
273-
outputs:
274-
grouped-data:
275-
unit: none
276-
description: Grouped data
277-
aggregation-method: none
278264
execution:
279265
command: >-
280266
/Users/mariamkhalatova/.npm/_npx/1bf7c3c15bf47d04/node_modules/.bin/ts-node
@@ -327,7 +313,7 @@ tree:
327313
- mock-observations
328314
regroup:
329315
- cloud/region
330-
- instance-type
316+
- cloud/instance-type
331317
compute:
332318
- interpolate
333319
- cpu-factor-to-wattage
@@ -681,7 +667,7 @@ tree:
681667
- mock-observations
682668
regroup:
683669
- cloud/region
684-
- instance-type
670+
- cloud/instance-type
685671
compute:
686672
- interpolate
687673
- cpu-factor-to-wattage

manifests/examples/pipelines/pipeline-with-aggregate.yml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -158,33 +158,6 @@ initialize:
158158
end-time: "2023-12-12T00:01:00.000Z"
159159
interval: 5
160160
allow-padding: true
161-
parameter-metadata:
162-
inputs:
163-
timestamp:
164-
unit: RFC3339
165-
description: refers to the time of occurrence of the input
166-
aggregation-method: none
167-
duration:
168-
unit: seconds
169-
description: refers to the duration of the input
170-
aggregation-method: sum
171-
cloud/instance-type:
172-
unit: none
173-
description: type of Cloud Instance name used in the cloud provider APIs
174-
aggregation-method: none
175-
cloud/region:
176-
unit: none
177-
description: region cloud instance
178-
aggregation-method: none
179-
time-reserved:
180-
unit: seconds
181-
description: time reserved for a component
182-
aggregation-method: avg
183-
outputs:
184-
synced-time:
185-
unit: none
186-
description: Synced time
187-
aggregation-method: none
188161
tree:
189162
children:
190163
child-1:

src/__tests__/if-run/builtins/time-sync.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -456,12 +456,10 @@ describe('execute(): ', () => {
456456
{
457457
timestamp: '2023-12-12T00:00:00.000Z',
458458
duration: 1,
459-
'cpu/utilization': 10,
460459
},
461460
{
462461
timestamp: '2023-12-12T00:00:01.000Z',
463462
duration: 1,
464-
'cpu/utilization': 10,
465463
},
466464
];
467465

@@ -566,17 +564,14 @@ describe('execute(): ', () => {
566564
},
567565
]);
568566

569-
/**In each 5 second interval, 60% of the time cpu/utilization = 10, 40% of the time it is 0, so cpu/utilization in the averaged result be 6 */
570567
const expectedResult = [
571568
{
572569
timestamp: '2023-12-12T00:00:00.000Z',
573570
duration: 5,
574-
'resources-total': 10,
575571
},
576572
{
577573
timestamp: '2023-12-12T00:00:05.000Z',
578574
duration: 5,
579-
'resources-total': 10,
580575
},
581576
];
582577

0 commit comments

Comments
 (0)