jBASE Independent Metrics Integration (JIMI)

This section describes Event Driven Metrics (EDM) and Source Quality Metrics (SQM).

jBASE Independent Metrics Integration (JIMI) is of two types:

  • Event Driven Metrics (EDM), which are produced in real time.
  • Source Quality Metrics (SQM), which are produced when programs are compiled.

Event Driven Metrics

In jBASE release 4.1 onwards, a functionality allows you to gather information about application events in a non-real time manner. These statistics include information such as execution path length, database I/O operations, execution path branches (CALL and PERFORM) and so on.

There are three basic ways of enabling EDM.

  1. Using API to enable this functionality on the same port or another user’s port.
  2. From the command line, using the jprof command to enable this functionality for your own port or another user’s port.
  3. Using the JDIAG environment variable.

The use of EDM means jBASE will generate a text file describing all sorts of information.

Source Quality Metrics

There are options for both the BASIC and jcompile command to evaluate the quality of the compiled source code. Overall jBASE merely generates the statistics during a compilation. The J option allows to generate the SQM data to the BASIC command and the -JJ option to the jcompile command.

In either case, the output is a simple text file whose name is of the format sourcename.sqm, where sourcename is the original source name. The text file is placed in the same file where the original source code was found.

The layout of the file is a multi-value file whose attributes are as follows.

NOTE: Use the text name given to each attribute rather than hard coding an attribute number as the layout might change (found in jimiBh).
Attribute Description

001 JBASE_SQM_VARIABLES

A multi-value list of all variable names local to the subroutine (or main program). In case of dimensioned arrays, the initial dimensions are given as defined. For example, FILEVAR(10,2).

002 JBASE_SQM_SUBROUTINES

A multi-value list of all subroutines called in the format SUBROUTINENAME<vm> Line Number. Note that a call such as “CALL @subname” will have “@subname” as the subroutine name, which allows you to differentiate between direct and indirect calls.

005 JBASE_SQM_INSERT:

A multi-value list of all the INSERT statements seen. The format of this is not accurately defined at the moment but will probably be in the format ‘NAME_OF_INSERT_FILE<sv>NUMBER_LINES_EQUATES<sv>NUMBER_LINES_CODE’.

011 JBASE_SQM_SELECT:

A multi-value list of all ‘SELECT’ statements seen where each value is the line number it is seen on.

012 JBASE_SQM_RELEASE:

A multi-value list of all line numbers containing a ‘RELEASE’ statement.

013 JBASE_SQM_RELEASE_VAR:

A multi-value list of all ‘RELEASE VARiable’ statements seen where each value is the line number it is seen on.

014 JBASE_SQM_TRANSACTION

A multi-value list of all transaction statements where each value is of the format ‘TRANSTART|TRANSEND|TRANSABORT<sv>line_number’.

015 JBASE_SQM_GOTO

A list of all line numbers where a GOTO is seen.

016 JBASE_SQM_RETURNTO:

A list of all line numbers where a ‘RETURN TO’ statement is seen.

019 to 049

Reserved

050 JBASE_SQM_DATE

The date in internal format, this SQM file was created.

051 JBASE_SQM_TIME

The time in internal format, this SQM file was created.

052 JBASE_SQM_JBASE_USER

The jBASE user name who compiled this SQM file.

053 JBASE_SQM_OS_USER

The operating system name of the user who compiled this SQM file.


Bookmark Name Actions
Feedback
x