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

Notice that 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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.akamas.io/akamas-docs/3.3.1/akamas-reference/construct-templates/study-template/workload-selection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
