Specify a selection of function-list metrics. The string metric-spec can either be the keyword default, which restores the default metric selection, or a list of metric keywords, separated by colons. The following example illustrates a metric list.
% metrics i.user:i%user:e.user:e%user
This command instructs the er_print utility to display the following metrics:
Inclusive user CPU time in seconds
Inclusive user CPU time percentage
Exclusive user CPU time in seconds
Exclusive user CPU time percentage
By default, the metric setting used is based on the dmetrics command processed from .er.rc files, as described in Setting Defaults in .er.rc Files. If a metrics command explicitly sets metric-spec to default, the default settings are restored as appropriate to the data recorded.
When metrics are reset, the default sort metric is set in the new list.
If metric-spec is omitted, the current metrics setting is displayed.
In addition to setting the metrics for the function list, the metrics command sets metrics for callers-callees, for data-derived output, and for index objects. The callers-callees metrics show the attributed metrics that correspond to those metrics in the functions list whose inclusive or exclusive metrics are shown, as well as the static metrics.
The dataspace metrics show the dataspace metrics for which data is available and that correspond to those metrics in the function list whose inclusive or exclusive metrics are shown, as well as the static metrics.
The index objects metrics show the index-object metrics corresponding to those metrics in the function list whose inclusive or exclusive metrics are shown, as well as the static metrics.
When the metrics command is processed, a message is printed showing the current metric selection. For the preceding example, the message is as follows.
For information about the syntax of metric lists, see Metric Lists. To see a listing of the available metrics, use the metric_list command.
If a metrics command has an error, it is ignored with a warning, and the previous settings remain in effect.