A metric is a counter, gauge, numeric ID, or string that you define. You specify one or more metrics for each ARM transaction class. When a start handle (instance of the transaction class) is started, updated, or stopped , the application indicates a value for the metric and writes it to the ARM log by the ARM agent.
The user metric name and user metric definition must be specified together in the %ARMGTID. METRNAM1-7= names the user metric and must be a SAS character variable or quoted literal value up to eight characters in length. METRDEF1-7= defines the output of the user-defined metric. The value of METRDEF1-6= must be one of the following:
COUNT32, COUNT64, COUNTDIV | use the counter to sum up the values over an interval. A counter can also calculate average values, maximums, and minimums per transaction, and other statistical calculations. |
GAUGE32, GAUGE64, GAUGEDIV | use the gauge when a sum of values is not needed. A gauge can calculate average values, maximums, and minimums per transaction, and other statistical calculations. |
ID32, ID64 | use the numeric ID simply as an identifier but not as a measurement value, such as an error code or an employee ID. No calculations can be performed on the numeric ID. |
SHORTSTR, LONGSTR | use the string ID as an identifier. No calculations can be performed on the string ID. Restriction: METRDEF7= can only equal LONGSTR and can be a long string of 32 bytes. METRDEF1-6 cannot equal LONGSTR. |
Note: 32 and 64 signify the number of bits in the counter, gauge, divisor, or ID.
The METRVAL1-7= sends the value of the user-defined metric to the ARM agent for logging when used in the %ARMSTRT, %ARMUPDT, and %ARMSTOP. The value of the user-defined metric must conform to the corresponding user metrics defined in the %ARMGTID. The following example shows the user metrics:
%let _armacro=1; %arminit(appname='Sales App', appuser='userxyz'); /* name and define the user defined metrics */ %armgtid(txnname='Sales Order', txndet='Sales Order Transaction', metrnam1= aname , metrdef1=count32); /* aname is the NAME of the metric and can be anything up to 8 characters */ /* start of user defined metric */ /* initial value of the metric */ %armstrt(metrval1=0); data myfile; . . /*some SAS statements*/ . end=EOF; run; /* value of the metric is the automatic observation */ %armupdt(data='Sales transaction still running...',maconly=no, metrval1=_N_); data myfile; . . /*more SAS statements*/ . if EOF then /* value of the metric is at the highest observation count */ %armstop(status=0, metrval1=_N_,maconly=no); run; %armend;