# 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.6/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.6/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://4103111959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrIhBBVa4sw46ol13SWX%2Fuploads%2Fgit-blob-ae6b2e9c8504812b5bdaea172971acad023706ab%2FScreenshot%202022-12-22%20at%2009.03.21.png?alt=media" alt=""><figcaption></figcaption></figure>

and are represented in metric charts for each specific optimization study

<figure><img src="https://4103111959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrIhBBVa4sw46ol13SWX%2Fuploads%2Fgit-blob-67322287ee87bb93b9f2896f1757cd21abddcf86%2FScreenshot%202022-12-22%20at%2009.06.36.png?alt=media" 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.6/reference/glossary/telemetry-providers) by means of a specific [Telemetry Instance](https://docs.akamas.io/akamas-docs/3.6/reference/glossary/telemetry-instance) defined for each specific target system.
