General

GUI Reference: General Information About Metric Reports

Metric reports are slightly more complicated than search result pages for other search domains, because they represent information in two dimensions: the metrics being reported, and the code elements for which metric values are shown.

This section contains general information about metric reports.

Metric report availability is independent of the language or languages involved, but the report contents will depend on the metric values available. In particular:



Important Note: the CodeSonar Web GUI makes extensive use of JavaScript. Make sure JavaScript is enabled in your web browser.

About Metric Reports

A metric report presents a subset of the metric values recorded by the hub. This subset is specified in two dimensions:

We use the following terminology.

component search The set of constraints used to specify which components will be in the report. Note that a component that satisfies the constraints will not be present in the report if none of the metrics included has the appropriate granularity. Component searches are specified using the metric search language.
metrics included The set of metrics whose values will be in the report (that is, which tables the report will include).
table limit An upper bound L on the size of each table in the report. By default, each table is sorted in descending order by value, so is displaying the L highest values of the metric in the search results. Sorting the table in different ways will generally cause different sets of rows to be displayed.
{eligible, present, displayed} component For a given warning report, we say a code component is:
  • eligible for the report if
    • it is in the appropriate scope:
      • for procedures, (usually) the most recent analysis of the project - see Procedures: Availability for details,
      • for code components at all other granularities, the scope specified for the report,
      and
    • it satisfies the constraints imposed by the component search (if any), and
    • is also eligible for the report described by the current Metric Filter selection, if any.
    To modify the set of eligible components, change the Metric Filter selection or use the simple search tool to specify a new component search.
  • present in the report if
    • it is eligible for the report, and
    • at least one of the metrics included in the report has granularity matching the component.
    When a metric report is exported in CSV or XML format, the exported file includes all present elements.

    To modify the set of present components, use the edit report feature to add to (or remove from) the set of included metrics.

  • displayed in a report table if
    • it is present in the report, and
    • its table row appears in the first L rows under the current table sort order, where L is the table limit.
  • If the report contains only one table, all present components are displayed.

    To modify the set of displayed components for a table, either change the table limit or change the table sort order.

Operations On Metric Reports

The following metric report operations are provided.

create new Specify contents for a new metric report, then open that report. Provided by Metric Report Creation and the Advanced Search: Metrics tab. Also provided in the simple search tool when the domain/scope setting specifies the metrics domain.
edit Change the set of metrics included in the report, or modify the component search. Provided by Metric Report.
save Save a metric report (both metrics included and component search) for later access. Provided by Metric Report.
open saved Open a saved metric report. Provided by Metric Report Creation.
filter visibility The Visible Metrics selector, when available, contains the names of saved metric reports for which you have NAMEDSEARCH_EXISTS permission. Selecting the name of a report will impose the component search constraints on the current page contents.
  • The metrics included for the selected report are not imposed.
  • If there is a focal analysis A, the scope of the search is A. Otherwise, the scope is the same as it was in the original metric report.
delete saved Delete a saved metric report. Provided by Manage Saved Searches.

Relevant GUI Pages

Several GUI page types are relevant to metric reports.

Advanced Search Metrics tab search functionality is equivalent to create new.
Analysis Provides links to shortcut reports and to Metric Report Creation.
Chart In charts of metric values, each chart component is linked to a Metric Report describing that component.
Chart Table In chart tables of metric values, each row is linked to a Metric Report describing the corresponding component.
Metric Report Displays metric reports; provides save and edit functionality.
Metric Report Creation Displays analysis-granularity metrics; provides open saved and create new functionality.
Saved Searches Displays descriptions of all saved searches; provides delete saved functionality.

Report Shortcuts

Metric report shortcuts are provided on the Analysis page, and from charts (and chart tables) of metric values.

Metric Report Shortcuts: Analysis

Every Analysis page has metric report shortcut links (and links to corresponding shortcut charts) under Metrics:

screenshot fragment: charts and tables expansion for analysis page

file comment density A metric report displaying Lines with Code and Lines With Comments for each source file in the analysis.
procedure complexity A metric report displaying Lines with Code and Cyclomatic Complexity for each procedure encountered by the analysis.

Metric Report Shortcuts: Charts and Chart Tables

For charts of metric values, clicking on a chart component will link to a metric report describing the component.

For example, in a bar chart of "Total Lines per File", clicking a bar will open a metric report displaying the Total Lines value for the file represented by the bar.