# 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.

{% code lineNumbers="true" %}

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

{% endcode %}

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</code></p><p>where <code>component\_name</code> is an existing component, and <code>metric\_name</code> is an existing metric associated with the component-type of the component <code>component\_name</code></p> | TRUE        | <p><br><br></p> | The metric of the component that represents the workload            |
| `domain` | array of numbers | should be of size 2, contain either all integers or real numbers (do not omit the "."), be set only if the metric has a domain of type `integer` or `real,`and be compatible with the domain defined in the component-type the `component_name` refers to                                         | FALSE       | <p><br><br></p> | A custom domain for the metric to be used by the optimization study |

Notice that, while the `domain` can be used to specify the maximum and minimum values for a workload metric, it is not recommended to specify static workloads domains as Akamas can dynamically define them by using the observed minimum and maximum value of the metric.

Also notice that workload metrics must have been defined in the `metricsSelection`.

### Examples

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

{% code lineNumbers="true" %}

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

{% endcode %}
