# Workload selection

The `workloadsSelection` is a structure used to define the metrics that are used by Akamas to model workloads as part of a live optimization study.

```yaml
workloadsSelection:
  - name: component1.metric1
  - name: component2.metric2:p95
```

with the following fields:

| Field  | Type   | Value restriction                                                                                                                                                                                                                                                                                                                                                     | Is required | Default value | Description                                              |
| ------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ------------- | -------------------------------------------------------- |
| `name` | string | <p>should match the following syntax:</p><p><code>component\_name.metric\_name<:aggregation></code></p><p>where <code>component\_name</code> is an existing component, <code>metric\_name</code> is an existing metric associated with the component-type of the component <code>component\_name</code>, and aggregation is an optional aggregation (default avg)</p> | TRUE        |               | The metric of the component that represents the workload |

Workload metrics must have been defined in the `metricsSelection`. Variables used in the name field can include an aggregation. The following aggregations are available: `avg`, `min`, `max`, `sum`, `p90`, `p95`, `p99`.

### Examples

The following refers to a workload represented by the metric `transactions_throughput` of the `konakart` component with multiple aggregations:

```yaml
workloadsSelection:
  - name: konakart.transactions_throughput
  - name: konakart.transactions_throughput:p95
```
