Measure User's Guide
Measure User’s Guide—520560-003
5-1
5 Defining Custom Counters
You can define custom counters to collect information about an application. Any 
counters you define are of the USERDEF entity type. To use these counters, you must 
first instrument the application to measure (that is, modify it so it bumps the counters).
Task 1: Instrument an Application
To instrument an application, you must determine the counters the application requires, 
choose a name for each counter, and specify its type. You must then decide how 
frequently the counters should be bumped and modify the application source code to 
bump the counters at the selected times.
Table 5-1 lists the four types of user-defined counters you can include in an application. 
For detailed descriptions, see the Measure Reference Manual.
Topic Page
Task 1: Instrument an Application
5-1
Task 2: Measure the Application 5-6
Sample COBOL Application 5-9
Table 5-1. User-Defined Counters
Type Name Description
Accumulating ACCUM Same as a Measure incrementing or accumulating counter. You 
can specify either of two bump functions:
•
INC increments the counter each time an event occurs.
•
ADD adds a user-specified value to the counter whenever 
data is transferred.
Busy BUSY Same as a Measure busy counter. It measures the amount of 
time a resource is busy. You must specify two bump functions:
•
SETBUSY starts the counter.
•
RESETBUSY stops the counter.
Fixed 
Accumulating
FACCUM Same as a Measure incrementing or accumulating counter. It is 
a 64-bit accumulating or incrementing counter type. You can 
specify either of two bump functions:
•
INC increments the counter each time an event occurs.
•
ADD adds a user-specified value to the counter whenever 
data is transferred.
Queue QUEUE Same as a Measure queue counter. It measures the time that 
elements spend on a queue. You must specify two bump 
functions:
•
INCQUEUE increases the queue length by one.
•
DEQUEUE decreases the queue length by one.










