Skip to content

Commit

Permalink
Merge pull request #943 from Green-Software-Foundation/fix-aggregatio…
Browse files Browse the repository at this point in the history
…n-method

Fix aggregation method
  • Loading branch information
narekhovhannisyan authored Aug 8, 2024
2 parents c4cf1f1 + 27fce36 commit eef1183
Show file tree
Hide file tree
Showing 25 changed files with 609 additions and 584 deletions.
7 changes: 2 additions & 5 deletions Refactor-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,7 @@ The aggregate plugin aggregates data in two ways: first it condenses individual
This is a builtin feature of IF, meaning it does not have to be initialized as a plugin. Instead, you just have to include a short config block in the top of the manifest file. There are two pieces of information required:
- `metrics`: which metrics do you want to aggregate? Every metric you provide here must exist in the output array.
- `method`: the aggregation method for the specied metric
- `metrics`: which metrics do you want to aggregate? Every metric you provide here must exist in the output array and be described in the `parameter-metadata` of the plugin.
- `type`: the options are `horizontal`, `vertical` or both. Horizontal aggregation is the type that condenses each time series into a single summary value. Vertical aggregation is aggregated across components.
Expand All @@ -210,8 +208,7 @@ Here's what the config block should look like:
```yaml
aggregation:
metrics:
'carbon':
method: 'sum'
- carbon
type: 'both'
```
Expand Down
26 changes: 20 additions & 6 deletions manifests/examples/pipelines/nesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ tags:
category: on-premise
aggregation:
metrics:
"carbon":
method: sum
- carbon
type: "both"
initialize:
plugins:
Expand Down Expand Up @@ -139,6 +138,21 @@ initialize:
- carbon-operational
- carbon-embodied
output-parameter: carbon
parameter-metadata:
inputs:
carbon-operational:
description: Operational carbon footprint
unit: gCO2eq
aggregation-method: sum
carbon-embodied:
description: Embodied carbon footprint
unit: gCO2eq
aggregation-method: sum
outputs:
carbon:
description: Total carbon footprint
unit: gCO2eq
aggregation-method: sum
time-sync:
method: TimeSync
path: "builtin"
Expand Down Expand Up @@ -169,10 +183,10 @@ initialize:
unit: seconds
description: time reserved for a component
aggregation-method: avg
network/energy:
description: 'Energy consumed by the Network of the component'
unit: 'kWh'
aggregation-method: 'sum'
network/energy:
description: "Energy consumed by the Network of the component"
unit: "kWh"
aggregation-method: "sum"
tree:
children:
child-0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ description: a full pipeline with the aggregate feature enabled
tags: null
aggregation:
metrics:
carbon:
method: sum
- carbon
type: both
initialize:
plugins:
Expand Down Expand Up @@ -159,6 +158,21 @@ initialize:
- carbon-operational
- carbon-embodied
output-parameter: carbon
parameter-metadata:
inputs:
carbon-operational:
description: Operational carbon footprint
unit: gCO2eq
aggregation-method: sum
carbon-embodied:
description: Embodied carbon footprint
unit: gCO2eq
aggregation-method: sum
outputs:
carbon:
description: Total carbon footprint
unit: gCO2eq
aggregation-method: sum
time-sync:
path: builtin
method: TimeSync
Expand Down
Loading

0 comments on commit eef1183

Please sign in to comment.