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

add time and component to the aggregation-method in the example manifests #112

Merged
merged 2 commits into from
Oct 2, 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
12 changes: 9 additions & 3 deletions docs/developers/how-to-build-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,22 @@ initialize:
cpu/energy:
description: energy consumed by the cpu
unit: kWh
aggregation-method: sum
aggregation-method:
time: sum
component: sum
network/energy:
description: energy consumed by data ingress and egress
unit: kWh
aggregation-method: sum
aggregation-method:
time: sum
component: sum
outputs:
energy-sum:
description: sum of energy components
unit: kWh
aggregation-method: sum
aggregation-method:
time: sum
component: sum
```

### Mapping
Expand Down
40 changes: 25 additions & 15 deletions docs/major-concepts/manifest-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,15 @@ plugins:
carbon-operational:
description: "carbon emitted due to an application's execution"
unit: 'gCO2eq'
aggregation-method: 'sum'
aggregation-method:
time: sum
component: sum
embodied-carbon:
description: "carbon emitted during the production, distribution and disposal of a hardware component, scaled by the fraction of the component's lifespan being allocated to the application under investigation"
unit: 'gCO2eq'
aggregation-method: 'sum'
aggregation-method:
time: sum
component: sum
```

#### Execution (auto-generated)
Expand Down Expand Up @@ -160,25 +164,31 @@ explain:
carbon:
plugins:
- sci
unit: gCO2eq
description: >-
total carbon emissions attributed to an application's usage as the sum
of embodied and operational carbon
aggregation-method: 'sum'
unit: gCO2eq
description: >-
total carbon emissions attributed to an application's usage as the sum
of embodied and operational carbon
aggregation-method:
time: sum
component: sum
requests:
plugins:
- sci
unit: requests
description: number of requests made to application in the given timestep
aggregation-method: 'sum'
unit: requests
description: number of requests made to application in the given timestep
aggregation-method:
time: sum
component: sum
sci:
plugins:
- sci
unit: gCO2eq/request
description: >-
software carbon intensity expressed as a rate of carbon emission per
request
aggregation-method: 'sum'
unit: gCO2eq/request
description: >-
software carbon intensity expressed as a rate of carbon emission per
request
aggregation-method:
time: sum
component: sum
```

### Tree
Expand Down
16 changes: 10 additions & 6 deletions docs/reference/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ You can override the parameter metadata provided in a plugin's source code by ad
```yaml
explainer: true
plugins:
"sum-carbon":
path: "builtin"
'sum-carbon':
path: 'builtin'
method: Sum
config:
input-parameters:
Expand All @@ -50,12 +50,16 @@ plugins:
inputs:
carbon-operational:
description: "carbon emitted due to an application's execution"
unit: "gCO2eq"
aggregation-method: 'sum',
unit: 'gCO2eq'
aggregation-method:
time: sum
component: sum,
carbon-embodied:
description: "carbon emitted during the production, distribution and disposal of a hardware component, scaled by the fraction of the component's lifespan being allocated to the application under investigation"
unit: "gCO2eq"
aggregation-method: 'sum'
unit: 'gCO2eq'
aggregation-method:
time: sum
component: sum
```

Read more on [explainer](../users/how-to-use-the-explain-feature.md)
Expand Down
92 changes: 69 additions & 23 deletions docs/users/how-to-use-the-explain-feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,16 @@ initialize:
cpu/utilization:
description: 'portion of the total CPU capacity being used by an application'
unit: 'percentage'
aggregation-method: 'avg'
aggregation-method:
time: avg
component: avg
outputs:
cpu-factor:
description: "a dimensionless intermediate used to scale a processor's thermal design power by CPU usage"
unit: 'dimensionless'
aggregation-method: 'avg'
aggregation-method:
time: avg
component: avg
```

## Example manifest
Expand Down Expand Up @@ -153,16 +157,22 @@ initialize:
carbon-operational:
description: "carbon emitted due to an application's execution"
unit: 'gCO2eq'
aggregation-method: 'sum'
aggregation-method:
time: sum
component: sum
embodied-carbon:
description: "carbon emitted during the production, distribution and disposal of a hardware component, scaled by the fraction of the component's lifespan being allocated to the application under investigation"
unit: 'gCO2eq'
aggregation-method: 'sum'
aggregation-method:
time: sum
component: sum
outputs:
carbon:
description: "total carbon emissions attributed to an application's usage as the sum of embodied and operational carbon"
unit: 'gCO2eq'
aggregation-method: 'sum'
aggregation-method:
time: sum
component: sum
sci:
kind: plugin
method: Sci
Expand All @@ -174,16 +184,22 @@ initialize:
carbon:
description: "total carbon emissions attributed to an application's usage as the sum of embodied and operational carbon"
unit: 'gCO2eq'
aggregation-method: 'sum'
aggregation-method:
time: sum
component: sum
requests:
description: 'number of requests made to application in the given timestep'
unit: 'requests'
aggregation-method: 'sum'
aggregation-method:
time: sum
component: sum
outputs:
sci:
description: 'software carbon intensity expressed as a rate of carbon emission per request'
unit: 'gCO2eq/request'
aggregation-method: 'sum'
aggregation-method:
time: sum
component: sum
tree:
children:
child:
Expand Down Expand Up @@ -217,64 +233,86 @@ explain:
vCPUs:
description: number of CPUs allocated to an application
unit: CPUs
aggregation-method: copy
aggregation-method:
time: copy
component: copy
memory:
description: RAM available for a resource, in GB
unit: GB
aggregation-method: copy
aggregation-method:
time: copy
component: copy
ssd:
description: number of SSDs available for a resource
unit: SSDs
aggregation-method: copy
aggregation-method:
time: copy
component: copy
hdd:
description: number of HDDs available for a resource
unit: HDDs
aggregation-method: copy
aggregation-method:
time: copy
component: copy
gpu:
description: number of GPUs available for a resource
unit: GPUs
aggregation-method: copy
aggregation-method:
time: copy
component: copy
usage-ratio:
description: >-
a scaling factor that can be used to describe the ratio of actual
resource usage comapred to real device usage, e.g. 0.25 if you are
using 2 out of 8 vCPUs, 0.1 if you are responsible for 1 out of 10 GB
of storage, etc
unit: dimensionless
aggregation-method: copy
aggregation-method:
time: copy
component: copy
time:
description: >-
a time unit to scale the embodied carbon by, in seconds. If not
provided,time defaults to the value of the timestep duration.
unit: seconds
aggregation-method: copy
aggregation-method:
time: copy
component: copy
outputs:
embodied-carbon:
description: embodied carbon for a resource, scaled by usage
unit: gCO2e
aggregation-method: sum
aggregation-method:
time: sum
component: sum
sum-carbon:
method: Sum
path: builtin
inputs:
carbon-operational:
unit: gCO2eq
description: carbon emitted due to an application's execution
aggregation-method: sum
aggregation-method:
time: sum
component: sum
embodied-carbon:
unit: gCO2eq
description: >-
carbon emitted during the production, distribution and disposal of a
hardware component, scaled by the fraction of the component's lifespan
being allocated to the application under investigation
aggregation-method: sum
aggregation-method:
time: sum
component: sum
outputs:
carbon:
unit: gCO2eq
description: >-
total carbon emissions attributed to an application's usage as the sum
of embodied and operational carbon
aggregation-method: sum
aggregation-method:
time: sum
component: sum
sci:
method: Sci
path: builtin
Expand All @@ -284,24 +322,32 @@ explain:
description: >-
total carbon emissions attributed to an application's usage as the sum
of embodied and operational carbon
aggregation-method: sum
aggregation-method:
time: sum
component: sum
functional-unit:
description: >-
the name of the functional unit in which the final SCI value should be
expressed, e.g. requests, users
unit: none
aggregation-method: sum
aggregation-method:
time: sum
component: sum
requests:
unit: requests
description: number of requests made to application in the given timestep
aggregation-method: sum
aggregation-method:
time: sum
component: sum
outputs:
sci:
unit: gCO2eq/request
description: >-
software carbon intensity expressed as a rate of carbon emission per
request
aggregation-method: sum
aggregation-method:
time: sum
component: sum
```

## When _not_ to use `explainer`
Expand Down