A metric is the item of information about the specific aspect of a model. The collection of various metrics can be used to evaluate the current state of the model. Calculated at regular intervals they can help to track the evolution of model development.

For better understanding of further material, get acquainted with the following concepts

Concept | Description |
---|

**Metric suite** | A collection of parameter and metric definitions used to calculate the metrics that evaluate specific aspects of your model. |

**Parameter definition** | The variable that is used to calculate metrics. It can be an element type (including both relationship and DSL element types), particular element, data type, or data type value. |

**Metric definition** | The formula for calculating metrics according to the parameter values. |

In general, a metric suite is a class with the «MetricSuite» stereotype applied. Both parameter and metric definitions are attributes of a metric suite.

One metric is the result of a single calculation of a metric definition. The metrics of all the metric definitions of a metric suite together with relevant parameters are stored in a single instance of a metric suite (as slot values). To analyse and manage instances of a metric suite with MagicDraw, use the metric table.

There are several conventions that you must know about metric suites before creating one:

- Metric suite must have a target. A target specifies model elements, for which metrics of the particular metric suite can be calculated. The target value can be any type of elements or even a particular element of your model.
- Metric suite must have one parameter definition declared as context. The element, which is selected for calculating metrics, is automatically set as the value of the context parameter definition.
- Metric suite must have a date tracker, so that you could see the timestamp of each metric.

The conventions that determine the main steps of creating a metric suite:

- Adding a new metric suite to your model.
- Specifying the target for the metric suite.
- Defining parameters (including the context parameter definition).
- Building metric definitions.