slmetric.metric.Metric Class
Namespace: slmetric.metric
Superclasses:
(To be removed) Abstract class for creating model metrics
The Metrics Dashboard user interface, metricdashboard
function, slmetric
package API, and corresponding customizations will be removed in a future release. For more information, see Migrating from Metrics Dashboard to Model Maintainability Dashboard.
Description
Abstract base class for creating model metrics. To create a model metric, create a
MATLAB® class that derives from the slmetric.metric.Metric
class.
Properties
CompileContext
— Compile mode
character vector
Compile mode for metric calculation. If your model metric requires model
compilation, specify PostCompile
. If your model metric
does not require model compilation, specify None
.
Example: 'PostCompile'
Data Types: char
ComponentScope
— Component scope
array of Advisor.component.Types
enum values
Model components for which metric is calculated. The metric is calculated for all components that match the type.
Description
— Metric description
character vector
Metric description.
Data Types: char
ID
— Metric ID
character vector
Unique metric identifier.
Data Types: char
Version
— Metric version number
integer
Use this property to communicate changes in your metric algorithm to the metric engine.
Data Types: uint32
Name
— Name of the metric algorithm
character vector
Specify a name for the custom metric algorithm.
Data Types: char
ValueName
— Name of the collected value
character vector
Specify a name for the value that the metric collects. When you view
detailed results in the Metrics Dashboard, the ValueName
is the column header for the collected value in the table and tree
views.
Data Types: char
AggregatedValueName
— Name of the aggregated value
character vector
Specify a name for the aggregated value that the metric collects. To
specify this property, set AggregationMode
to
None
. When you view detailed results in the Metrics
Dashboard, the AggregatedValueName
is the column header
for the collected aggregated value in the table and tree views.
Data Types: char
MeasuresNames
— Names of the collected measures
cell array of character vectors
Specify the names of the measures collected by the metric. Set this
property only if the metric algorithm writes measures to the result object
that the algorithm returns. When you view detailed results in the Metrics
Dashboard, the MeasuresNames
are column headers for the
collected measures in the table and tree views.
Data Types: char
AggregatedMeasuresNames
— Names of the aggregated measures
cell array of character vectors
Specify the names of the aggregated measures collected by the metric. Set
this property only if the metric algorithm writes measures to the result
object that the algorithm returns and AggregationMode
is
set to None
. When you view detailed results in the
Metrics Dashboard, the AggregatedMeasuresNames
are column
headers for the collected aggregated measures in the table and tree
views.
Data Types: char
ResultChecksumCoverage
— Reuse metric data
logical
If true
, results produced by the metric algorithm
change only if the model or library source files change. If the source file
and the metric Version
have not changed, metric data is
not regenerated. If false
, each call to
slmetric.Engine.execute
collects new data for this
metric and stores it in the metric repository.
Data Types: logical
AggregationMode
— How the metric algorithm aggregates the metric data
character array
Specify the operation to aggregate the
slmetric.metric.Result
object properties
Value
and Measure
across the
component hierarchy. The metric algorithm outputs the aggregated values in
the slmetric.metric.Result
object properties
AggregatedValues
and
AggregatedMeasures
. Options are:
Sum
: Returns the sum of theValue
property and theValue
properties of all its children components across the component hierarchy.Max
: Returns the maximum of theValue
property and theValue
properties of all its children components across the component hierarchy.None
: No aggregation of metric values.
Data Types: char
SupportsResultDetails
— Specify whether Details
property contains data
logical
Specify whether the slmetric.metric.Result
object
property Details
contains data. The default value is
false
. Metrics Dashboard filters are enabled when you
set the value of this property to false
.
Data Types: logical
Methods
algorithm | (To be removed) Specify logic for metric data analysis |
Version History
Introduced in R2016aR2022a: Metrics Dashboard will be removed
The Metrics Dashboard user interface, metricdashboard
function, slmetric
package API, and corresponding customizations will be removed in a future release. For more information, see Migrating from Metrics Dashboard to Model Maintainability Dashboard.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)