A resource group is a collection of resources (i.e., files and/or folders) defined by a set of one or more Ant file patterns. Resource groups enable more granular views of the data associated with a filter. After associating a resource group with a filter, the data presented in all widgets, reports, and explorer views for static analysis violations, metrics results, and coverage will be narrowed according to the defined pattern. Unit test results are not affected by resource groups. The following widgets and reports that present data according to resource groups are also available in DTP: 

See Adding Resource Groups to Projects for instructions on associating the resource groups you created for the project with filters.

  1. Choose Report Center Settings from the settings drop-down menu and click Filters in the Administration sidebar.
  2. Create a new filter or click on an existing filter.
  3. Click Add Resource Group in the Resource Group section.


     
  4. Click the add button (+) to associate a resource group with the filter and click Confirm. If resource groups have not been created for the project, the overlay will be empty. See Adding Resource Groups to Projects for information on how to create resource groups.

     
     
  5. Click the delete button (x) to remove the resource group from the filter.

     
     
  6. You can click on the resource group name add, remove, or modify resource group patterns in an overlay (see Adding Resource Groups to Projects for additional information). 

    All Instances of the Resource Group Will Be Modified

     If you make changes to a resource group, other filters that use the same resource group will be affected.



     

Changes are automatically saved.

About Resource Group Performance

The performance of DTP API when resource groups are used depends on the file patterns in the resource groups. Performance is most heavily influenced by how the database engine matches the pattern of the string specified. More complex file patterns are slower because they require more complex algorithms for matching strings.

From fastest to slowest, the three string matching algorithms:

  1. String equality ("=" in SQL)

  2. SQL LIKE operator

  3. Regular expressions

We have observed that string equality and LIKE can be up to ten times faster than regular expressions.

Example File Patterns

Pattern

Description

Examples

String equality  (= operator in SQL)

Fastest

This pattern contains no wildcards (**, *, or ?).

com.parasoft.foo/src/main/com/parasoft/foo/Alpha1.java

Bar.java

SQL LIKE

Fast

This pattern ends with a /** or /.

com.parasoft.foo/**

com.parasoft.foo/

SQL regular expressions

Slowest

This pattern uses any other use of wildcards.

com.parasoft.foo/*/.java

com.parasoft.foo/**/Alpha1.java

com.parasoft.foo/src/main/com/parasoft/foo/*.java

com.parasoft.foo/src/*/com/parasoft/foo/Alpha1.java

com.parasoft.foo/src/main/com/parasoft/foo/Alpha?.java

*/.java


  • No labels