Test Process Monitor - tpm_add


Use the Test Process Monitor tool (tpm_add) to create and update Test Process Monitor databases from a command line.


tpm_add -metric=<metric> [-file=<filename>] [-user=<user>] {[<value_field>]}



The Test Process Monitor (TPM) provides an integrated monitoring feature that helps project managers and test engineers obtain a statistical analysis of the progress of their development effort.

Metrics generated by a test or runtime analysis feature are stored in their own database. Each database is actually a three-dimensional table containing:

Each field contains a set of values.

Note   Although you specify a filename for the file under analysis, the TPM Viewer currently only displays a unique FileID number for each file.

The TPM database is made of two files that use the following naming convention:




where <nb_fields> is the number of fields contained in the database.

In the GUI, the Test Process Monitor gathers the statistical data from these database file and generates a graphical chart based on each field.

There are 3 steps to using TPM:

Creating a Database

Before opening the Test Process Monitor in the product, you must create a database.

Database files are created by using the tpm_add command line tool.

If you are using Code Coverage from the GUI, it automatically creates and updates a TPM code-coverage database.

If you are using the product in the command line interface you can invoke tpm_add from your own scripts.

To create a new metric database with tpm_add:

  1. Type the following command:

tpm_add -metric=<name> -file=<filename> <value1>[ {<value2>... }]


where <name> is the name of the new metric and <value> represents the initial value of each field in the database. <filename> is the name of the source file to which these values are related.

Updating a Database

The Test Process Monitor adds a record to the database each time it encounters an existing database.

To add a new record to this database:

  1. Type the tpm_add command:

tpm_add -metric=<name> <value1>[ {<value2>... }]


where <name> is the name of the new metric and <value> represents the initial value of each field in the database. The number of values must be the consistent with the number of fields in the table.

Note   It is important to remain consistent and supply the correct number of fields for your database. If you run the tpm_add command on an existing metric, but with a different number of fields, the feature creates a new database.


tpm_add -metric=stats 5 -6 5.4 3 0

Viewing TPM Reports

Use the Test Process Monitor menu in the product to display database. Please refer to the User Guide for further information.


The following command creates a user metric called stats, made up of five fields, containing initial values 1, 0.03, 0, 3 and -4.7.

tpm_add -metric=stats -file=/project/src/myapp.c 1 0.03 0 3 -4.7


The new database is contained in the following files:




The following line adds a new record to the stats database, pertaining to the myapp.c source file:

tpm_add -metric=stats -file=/project/src/myapp.c 5 -6 5.4 3 0


The following line adds a new set of values to the stats database, this time related to the mylib.c source file:

tpm_add -metric=stats -file=/project/src/mylib.c 5 -6 5.4 3 0


The metrics related to myapp.c and mylib.c are stored in the same database and can be viewed either jointly or separately in the product Test Process Monitor Viewer.


If the following command is issued:

tpm_add -metric=stats -file=myapp.c 5 -6 3 0


A new database is created with four fields: