Main Content

slmetric.metric.getAvailableMetrics

Namespace: slmetric.metric

(To be removed) Obtain available 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

IDs = slmetric.metric.getAvailableMetrics() get metric identifiers for available metrics in the metric engine.

example

[IDs,props] = slmetric.metric.getAvailableMetrics() get metric identifiers and properties.

example

Examples

collapse all

This example shows how to obtain the available model metric IDs.

ID = slmetric.metric.getAvailableMetrics()
ID =

  26×1 cell array

    {'mathworks.metrics.CloneContent'                          }
    {'mathworks.metrics.CloneDetection'                        }
    {'mathworks.metrics.CyclomaticComplexity'                  }
    {'mathworks.metrics.DescriptiveBlockNames'                 }
    {'mathworks.metrics.DiagnosticWarningsCount'               }
    {'mathworks.metrics.ExplicitIOCount'                       }
    {'mathworks.metrics.FileCount'                             }
    {'mathworks.metrics.IOCount'                               }
    {'mathworks.metrics.LayerSeparation'                       }
    {'mathworks.metrics.LibraryContent'                        }
    {'mathworks.metrics.LibraryLinkCount'                      }
    {'mathworks.metrics.MatlabCodeAnalyzerWarnings'            }
    {'mathworks.metrics.MatlabFunctionCount'                   }
    {'mathworks.metrics.MatlabLOCCount'                        }
    {'mathworks.metrics.ModelAdvisorCheckCompliance.hisl_do178'}
    {'mathworks.metrics.ModelAdvisorCheckCompliance.maab'      }
    {'mathworks.metrics.ModelAdvisorCheckIssues.hisl_do178'    }
    {'mathworks.metrics.ModelAdvisorCheckIssues.maab'          }
    {'mathworks.metrics.ModelFileCount'                        }
    {'mathworks.metrics.ParameterCount'                        }
    {'mathworks.metrics.SimulinkBlockCount'                    }
    {'mathworks.metrics.StateflowChartCount'                   }
    {'mathworks.metrics.StateflowChartObjectCount'             }
    {'mathworks.metrics.StateflowLOCCount'                     }
    {'mathworks.metrics.SubSystemCount'                        }
    {'mathworks.metrics.SubSystemDepth'                        }

This example shows how to obtain the available model metric properties.

[ID,PROPS]=slmetric.metric.getAvailableMetrics()
ID =

  26×1 cell array

    {'mathworks.metrics.CloneContent'                          }
    {'mathworks.metrics.CloneDetection'                        }
    {'mathworks.metrics.CyclomaticComplexity'                  }
    {'mathworks.metrics.DescriptiveBlockNames'                 }
    {'mathworks.metrics.DiagnosticWarningsCount'               }
    {'mathworks.metrics.ExplicitIOCount'                       }
    {'mathworks.metrics.FileCount'                             }
    {'mathworks.metrics.IOCount'                               }
    {'mathworks.metrics.LayerSeparation'                       }
    {'mathworks.metrics.LibraryContent'                        }
    {'mathworks.metrics.LibraryLinkCount'                      }
    {'mathworks.metrics.MatlabCodeAnalyzerWarnings'            }
    {'mathworks.metrics.MatlabFunctionCount'                   }
    {'mathworks.metrics.MatlabLOCCount'                        }
    {'mathworks.metrics.ModelAdvisorCheckCompliance.hisl_do178'}
    {'mathworks.metrics.ModelAdvisorCheckCompliance.maab'      }
    {'mathworks.metrics.ModelAdvisorCheckIssues.hisl_do178'    }
    {'mathworks.metrics.ModelAdvisorCheckIssues.maab'          }
    {'mathworks.metrics.ModelFileCount'                        }
    {'mathworks.metrics.ParameterCount'                        }
    {'mathworks.metrics.SimulinkBlockCount'                    }
    {'mathworks.metrics.StateflowChartCount'                   }
    {'mathworks.metrics.StateflowChartObjectCount'             }
    {'mathworks.metrics.StateflowLOCCount'                     }
    {'mathworks.metrics.SubSystemCount'                        }
    {'mathworks.metrics.SubSystemDepth'                        }


PROPS = 

  1×26 struct array with fields:

    Name
    Description
    IsBuiltIn
    Version

Output Arguments

collapse all

Metric identifiers in the metric engine.

Metric properties, returned as a structure array with the following fields:

NameName of the metric algorithm.
DescriptionDescription of the metric algorithm.
IsBuiltInBoolean indicating if the metric is included with Simulink® Check™.
VersionMetric algorithm version.

Data Types: struct

Version History

Introduced in R2016a

collapse all

R2022a: Warns

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.