8.3.2. Additional Metrics in Trend Charts¶
8.3.2.1. Background¶
You have a running Axivion Suite CI configuration and Web UI.
You want to add NOMV and NOMVPR metrics to the Trend charts.
You want to add another metric (e.g. “Switch Complexity”) to the Trend charts.
You want to add the number of suppressed issues to the Trend charts.
8.3.2.2. What can be configured?¶
You have to configure the project configuration to create the metrics and the dashboard configuration to display them.
8.3.2.3. What needs to be done?¶
NOMV/NOMVPR¶
Activate rules
Metric-HIS.NOMVandMetric-HIS.NOMVPRin your project configuration in order to calculate the metrics during analysis run.Enable the charts on the Trend Page in
dashboard2.configas follows:
<Node Key="ChartDefinitions">
...
<Node Key="Number of Misra Violations">
<Binding Key="1" Value="Metric.HIS.NOMV"/>
</Node>
<Node Key="Number of Misra Violations per Rule">
<Binding Key="1" Value="Metric.HIS.NOMVPR.MisraC2012-1.1"/>
<Binding Key="2" Value="Metric.HIS.NOMVPR.MisraC2012-15.5"/>
<Binding Key="3" Value="Metric.HIS.NOMVPR.MisraC2012-17.4"/>
...
</Node>
...
</Node>
Other metrics (e.g. “Switch Complexity”)¶
Activate the metric rules you want to calculate (in this example
Metric-SwitchComplexity).If you want to report all values (and not just violations), you can set
Metric-SwitchComplexity/report_all_valuestotrue(or more globallyMetrics/report_all_valuestotrueif you want to affect all metrics).In order to display metrics in Trend Page they need to get propagated to the system level first. Therefore you have to set
Metric-SwitchComplexity/propagatetotrueandMetric-SwitchComplexity/report_propagated_valuestoroot(if you want this effect for all metrics, you can similarly setMetrics/propagatetotrueandMetrics/report_propagated_valuestoroot).Enable the charts on the Trend Page in
dashboard2.configas follows:
dashboard2.config: Dashboard setup.¶ <Node Key="ChartDefinitions">
...
<Node Key="Complexity">
<Binding Key="2" Value="Metric.McCabe_Complexity.sum"/>
</Node>
...
</Node>
Note
It is also possible to visualize Average (.avg), Maximum (.max), and
Minimum (.min) values for metrics. This should be done in separate charts,
though, because the scales of such summary metrics do not match the scale of the
sum of a metric. Changes to the configuration have immediate effect in the dashboard.
Suppressed Issues¶
Set
/Results/Database/import_suppressed_issuestotruein the project configuration in order to also import suppressed issues into the database.Enable the charts on the Trend Page in
dashboard2.configas follows:
<Node Key="ChartDefinitions">
...
<Node Key="Style Violations">
<Binding Key="1" Value="Metric.Violations.Style"/>
<Binding Key="2" Value="Metric.Violations.Style.disabled"/>
</Node>
...
</Node>