# Metric

A **metric** is a measured property of a system.

Examples of a metric include:

* the response time of an application
* the utilization of a CPU
* the amount of time spent in garbage collection
* the cost of a cloud service

Metrics are used to both specify the optimization [goal and constraints](https://docs.akamas.io/akamas-docs/3.1.2/akamas-reference/glossary/goals-and-constraints) (e.g. minimize the heap size while keeping response time < 1000 and error rate <= 10% of a baseline value), and to assess the behavior of the system with respect to each specific configuration applied.

## Construct

A metric is described by the following properties:

* a **name** that uniquely identifies the metric
* a **description** that clarifies the semantics of the metric
* a **unit** that defines the unit of measurement used by the metric

The construct to be used to define a metric is described on the [Metric template](https://docs.akamas.io/akamas-docs/3.1.2/akamas-reference/construct-templates/metric-template) page.

## User Interface

Metrics are displayed in the Akamas UI when drilling down to each system component.

<figure><img src="https://2641073690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ubiK4vpNilxkD7Fauar%2Fuploads%2FAdXsBMRpC4zyzRyAbsBj%2FScreenshot%202022-12-22%20at%2009.03.21.png?alt=media&#x26;token=7e98cee5-631e-499d-b55e-5b7d5a72e938" alt=""><figcaption></figcaption></figure>

and are represented in metric charts for each specific optimization study

<figure><img src="https://2641073690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4ubiK4vpNilxkD7Fauar%2Fuploads%2FdDBRJ33fqsxuoOMSraeg%2FScreenshot%202022-12-22%20at%2009.06.36.png?alt=media&#x26;token=9eab7dcd-e546-4f8b-a8de-ed893dd67c62" alt=""><figcaption></figcaption></figure>

Please notice that in order for a metric to be displayed in the Akamas UI, it has to be collected from a [Telemetry Provider](https://docs.akamas.io/akamas-docs/3.1.2/akamas-reference/glossary/telemetry-providers) by means of a specific [Telemetry Instance](https://docs.akamas.io/akamas-docs/3.1.2/akamas-reference/glossary/telemetry-instance) defined for each specific target system.
