Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 49 Next »

Table of Contents

The Measures service provides a way to quickly execute all kinds of queries on project measures. You can for example get:

  • the recently inspected projects
  • the projects with blocker and critical issues
  • the projects with bad coverage on added/changed code within the 10 past days

The search query can then be saved as a filter to be displayed on dashboards.

The Measures service can be accessed through the top bar.

Watch the following screencast to get an overview of the Measures service:

Get Adobe Flash player

Search

To add criteria to the search query, click on More Criteria and select a criterion. As many criteria as you wish can be added.

Set the criteria and click on the Search button to display the results.
 



Icon

Note that only the first 1,000 results of the query are retrieved.

Available Criteria

Criteria

Description

Components

Types of component to search for: projects, views, files, developers, etc.

AlertFilter by alert level (Error | Warning | Ok).
Available since SonarQube 3.7. 

Components of

If the Components criterion is empty, only direct children will be displayed.
If the Components criterion is not empty, all the sub-components (of any sub-levels) of the Components type will be displayed.

Date

Filters components based on the last analysis date.
Format: YYYY-MM-DD (2012-01-31)
Example: only display components that have been analyzed since January 31st, 2012.

Favorites only

If checked, only components flagged as favorites will be displayed.

Key contains

Filters components whose key contains a given string.

Language

Drop-down list to select the languages to filter on.

Last analysis

Same as the Date criterion but a period has to be set instead of a date.
Example: only display components that have not been analyzed within the last 30 days.

MetricFilters components to those where a specific measure is greater than or less than a certain threshold.
Up to three "Metric" criteria can be defined.

Name contains

Filters components whose name contains a given string.

Results Display Configuration

By clicking on Change Columns, display details can be configured: list of measures (value or variation), ordering of the columns, sort, etc.

Limitation on variations

Icon

Note that variations cannot be displayed at file level (as all previous data are purged at file level during an analysis).

By default, data are also purged at package/module level. Thus variations cannot be displayed at this level by default. To change this behavior, log in as a System administrator, go to Settings > General Settings > General > Database Cleaner and set the Clean history data of directories/packages property to true.

Filters

Saving Search Query as Filter

To save a search query as a filter, click on the Save As link on the top right corner.

To create a shared filter, check the 

Displaying Filter

Filters (filters you created or that are shared by other users) can be displayed on global dashboards or project dashboards. Several visualizations are available:

  • List
  • Treemap
  • Bubble Chart (since SonarQube 4.2)
  • Histogram (since SonarQube 4.2)
  • Pie Chart (since SonarQube 4.2)


Measures Filter as List:

 

Measures Filter as Treemap:

 

Measures Filter as Bubble Chart:


Measures Filter as Pie Chart:


Measures Filter as Histogram:

 

 

Managing Filters

Once several filters have been created, it becomes necessary to manage them: edit, copy, delete, share, flag as favorite, etc. To do so, click on the left-hand side button in the search bar:



and click on Manage:

 

  • No labels