Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time sync aggregation parameters resolution #945

Merged
merged 7 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -261,20 +261,6 @@ initialize:
unit: none
description: Synced time
aggregation-method: none
group-by:
path: builtin
method: GroupBy
parameter-metadata:
inputs:
group:
unit: none
description: Group by fields
aggregation-method: none
outputs:
grouped-data:
unit: none
description: Grouped data
aggregation-method: none
execution:
command: >-
/Users/mariamkhalatova/.npm/_npx/1bf7c3c15bf47d04/node_modules/.bin/ts-node
Expand Down Expand Up @@ -327,7 +313,7 @@ tree:
- mock-observations
regroup:
- cloud/region
- instance-type
- cloud/instance-type
compute:
- interpolate
- cpu-factor-to-wattage
Expand Down Expand Up @@ -681,7 +667,7 @@ tree:
- mock-observations
regroup:
- cloud/region
- instance-type
- cloud/instance-type
compute:
- interpolate
- cpu-factor-to-wattage
Expand Down
27 changes: 0 additions & 27 deletions manifests/examples/pipelines/pipeline-with-aggregate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,33 +158,6 @@ initialize:
end-time: "2023-12-12T00:01:00.000Z"
interval: 5
allow-padding: true
parameter-metadata:
inputs:
timestamp:
unit: RFC3339
description: refers to the time of occurrence of the input
aggregation-method: none
duration:
unit: seconds
description: refers to the duration of the input
aggregation-method: sum
cloud/instance-type:
unit: none
description: type of Cloud Instance name used in the cloud provider APIs
aggregation-method: none
cloud/region:
unit: none
description: region cloud instance
aggregation-method: none
time-reserved:
unit: seconds
description: time reserved for a component
aggregation-method: avg
outputs:
synced-time:
unit: none
description: Synced time
aggregation-method: none
tree:
children:
child-1:
Expand Down
5 changes: 0 additions & 5 deletions src/__tests__/if-run/builtins/time-sync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,12 +456,10 @@ describe('execute(): ', () => {
{
timestamp: '2023-12-12T00:00:00.000Z',
duration: 1,
'cpu/utilization': 10,
},
{
timestamp: '2023-12-12T00:00:01.000Z',
duration: 1,
'cpu/utilization': 10,
},
];

Expand Down Expand Up @@ -566,17 +564,14 @@ describe('execute(): ', () => {
},
]);

/**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 */
const expectedResult = [
{
timestamp: '2023-12-12T00:00:00.000Z',
duration: 5,
'resources-total': 10,
},
{
timestamp: '2023-12-12T00:00:05.000Z',
duration: 5,
'resources-total': 10,
},
];

Expand Down
Loading