padv.builtin.task.CollectMetrics Class
Namespace: padv.builtin.task
Superclasses: padv.Task
Task for collecting model design and testing metrics
Description
The padv.builtin.task.CollectMetrics
class provides a task that can collect
model design and testing metrics using the metric.Engine
API for the Model
Design and Model Testing Dashboards. By default, the task collects model maintainability
metrics that can help you monitor the size, architecture, and complexity of the software units
and components in your
project.
But you can reconfigure the task to collect model testing, SIL code testing, or PIL code
testing metrics by using the Dashboard
property to specify which
dashboard you want to collect metrics
for.
You can add these tasks to your process model by using the method addTask
.
After you add the tasks to your process model, you can run the tasks from the Process
Advisor app or by using the function runprocess
.
To view the source code for this built-in task, in the MATLAB® Command Window, enter:
open padv.builtin.task.CollectMetrics
The padv.builtin.task.CollectMetrics
class is a handle
class.
Creation
Description
creates a task for collecting model maintainability metrics like size, architecture, and
complexity. These are the same metric results that the Model Maintainability
Dashboard uses.task
= padv.builtin.task.CollectMetrics()
sets certain properties using one or more name-value arguments. For example, task
= padv.builtin.task.CollectMetrics(Name=Value
)task
= padv.builtin.task.CollectMetrics(Name = "MyCollectMetricsTask")
creates a
task with the specified name.
You can use this syntax to set property values for InputQueries
,
Name
, IterationQuery
,
InputDependencyQuery
, Licenses
,
LaunchToolAction
, and LaunchToolText
.
The padv.builtin.task.CollectMetrics
class also has other properties, but you cannot set
those properties during task creation.