![]() |
![]() |
![]() |
![]() |
![]() |
General
It is possible to generate a number of complexity measurements when running the tool. The generated measurements are provided as raw data in a text file with comma as delimiter between fields. Viewing and manipulating this data can be performed using a spreadsheet tool.
The information in the complexity file can be used in many ways, for example:
- A project leader can obtain overall information about how a system evolves, by comparing different complexity files.
- By identifying the "most complex" parts of a system, a project leader can get help about how to allocate both development and test resources.
The Complexity File
The complexity file will have the name <system name>.csv and will be generated at the same time and in the same place as the .xref file (the target directory).
The .csv format is a "standard" spreadsheet format containing comma separated values. Many spreadsheet tools recognize this format, to read the file properly the list separator in the regional setting has to be "," (comma).
In some countries ";" (semicolon) is used as separator. If the separator is a semicolon the file should be imported as a text file, so the separator can be explicitly specified.
Generating the complexity file
The complexity file is generated during the analysis phase according to the following setup:
- In the Analyzer dialog, select Semantic Analysis and click Details.
- In the dialog displayed, select Generate a complexity measurement file and enter a file name.
Other ways of generating a complexity file
There are alternate ways of generating a complexity file:
- The environment variable SDT_COMPLEXITY_INFO can be set to generate a complexity file. In that case it is a prerequisite that an .xrf (cross references file) also has to be generated.
- As the calculation of the execution paths (see Execution Paths) is the most complex seen from the implementation side and at the same time is the calculation that might take some time, this calculation can be turned off by setting the environment variable SDT_NO_COMPLEXITY_PATH_INFO. The figures for this field in the file will then be 0. The recommendation, however, is to leave this calculation turned on, until something seems to go wrong.
- The Analyzer commands Set-ComplexityMeasurement and ComplexityMeasurement-File can be used for creating a complexity file.
- See Set-ComplexityMeasurement and ComplexityMeasurement-File for more information.
Complexity File Contents
There is one line in the file for each:
- System, System Type, Package
- Block, Block Type, Block Substructure
- Process, Process Type
- Service, Service Type
- Procedure (not simple procedures, >= 2 states or >= 50 symbols)
Each line contains first the declaration level. This is 1 for the system and for packages. Units defined in the system have level 2 and so on.
The lines then include the entity class and the name of the unit, followed by some complexity numbers. The complexity numbers are given both for the unit itself (local) and for the unit including all its subunits (total).
The lines are sorted so that all subunits are placed before the unit where they are defined.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |