Source Code Metrics | Inventory of Source Code

For auditing purposes or to assess the workload of your next development phase, you may need to estimate the volume of your code under different angles.

After analyzing your code, Visual Expert can calculate the number of:

  • Lines of code in your project, separating comments from instructions
  • PB objects, by type (how many DW, Window, UO...)
  • PB controls, by type (DW control, tab, text...) PB events, functions, variables, attributes, parameters...
  • Database objects called from PB (Procedures, tables, etc.)

You can also list the Web services and dll functions called by your PB code.
List of Web Services & DLL functions

Lines of Code

You can calculate this metric at various granularities:

  1. Application level
  2. PBL level
  3. Object level

No matter the granularity, the procedure is the same:

  • Select the item for which you need to calculate this metric - for instance the application
  • In the navigation bar, Click on [Code Metrics - Lines of Code]
  • The result shows up in the treeview
Count Lines of PB Code - Metrics

PowerBuilder Objects

As soon as you open a project, the number of PowerBuilder objects is indicated by type:
Count PowerBuilder Objects - Metrics

PowerBuilder Controls, Methods and Variables

  • Select an application in the section “Applications” of the treeview.
  • In the navigation bar, click on [Description - PowerBuilder Objects]
  • The result includes PB objects, controls, methods and variables:
Count PowerBuilder Objects - Metrics

Database Objects

No matter if your project includes only PowerBuilder code, Visual Expert will identify all schemas, tables, columns, procedures used by the PB code.

Moreover, if your project includes Oracle or SQL Server code, Visual Expert will also count all database objects found (Packages, triggers, functions, procedures, indexes, variables, parameters, etc.)

For projects including only PB code, the number of DB objects called is automatically displayed under the section “Database” of the treeview:

Count DB Objects for PowerBuilder Code
Count Oracle Database Objects for PL/SQL Code

For Projects including Oracle Code, an additional section called “PL/SQL” is added, listing the PL/SQL objects found.

The section Database still exists, and shows the total number of objects in your data model (Tables, Views..).

Similarly, Projects with SQL Server Code include a specific section for Transact-SQL Objects.

Count Oracle Database Objects for PL/SQL Code

Web Services called

You can list the Web Services called by selecting a code container - for example an application - and click on [Impact Analysis - Web Services Called] in the navigation bar.

Read this article to learn more about Cross-Referencing Web Services called from PowerBuilder.

List of Web Services Called from PowerBuilder

DLL Functions called

You can list the dll functions called by selecting a code container - for example an application - and click on [Impact Analysis - DLL functions Called] in the navigation bar.

Read this article to learn more about Cross-Referencing DLL functions called from PowerBuilder.

List of dll functions called from PowerBuilder

 

Visual Expert 2021, Source Code Metrics, PowerBuilder, Oracle, SQL Server