Using the VI Metrics Tool

Complete the following steps to analyze VIs.

  1. Open the VI(s) you want to analyze.
  2. Select Tools»Advanced»VI Metrics to display the VI Metrics dialog box.
  3. Use the pull-down menu at the top of the dialog box to select from the list of VIs whose front panels are currently open. After you select a VI, the dialog box updates the list at the bottom with the names of the VI and its subVIs plus information on each VI.

For each VI in the selected hierarchy, the dialog box lists the number of nodes that VI contains. This number gives you a rough metric that is comparable to the SLOC metric commonly used with text-based programming languages.

The number of nodes includes functions, such as Add and Subtract; subVI calls; structures; terminals for front panel objects; constants; global and local variables; and Property Nodes.

Notice that for Property Nodes, reading multiple properties with the same node counts as one node. You can select the User Interface Metrics option to determine the total number of properties a VI reads or writes.

The number of nodes does not include wires, tunnels, or objects that are subcomponents of structures, such as the loop iteration count of a For Loop or a sequence of local variables.

In addition to measuring the number of nodes, the VI Metrics tool can measure a number of other metrics related to the complexity of your VI(s). To show the additional information, place a checkmark in the appropriate category checkbox at the top right of the VI Metrics dialog box.

The following are the additional metrics available to you through the VI metrics tool: