Using SAS 9.2 ARM Interface with Existing ARM Applications |
You have a SAS application, and you want to track the application's performance. Using the SAS logging facility and the ARM interface, you can get the performance information you want with little development time. There are two options available:
enable the ARMSUBSYS= option (for example, in ARM_PROC), which gathers metric data at the PROC or DATA step boundaries
enable the performance macros at key points in the SAS code to obtain metric data
Adding performance macros results in reduced performance overhead. Use the following steps to add ARM to an application using a configuration file:
Create a SAS logging facility -logconfigloc configuration file. For an example of a SAS logging facility configuration file, see XML Configuration File. For more information about the SAS logging facility, see SAS Logging: Configuration and Programming Reference.
Specify ARMAGENT=LOG4SAS in a configuration file or within SAS language code.
Enable the ARMSUBSYS= system option (ARMSUBSYS= can be enabled in a SAS option).
Add %PERFINIT and %PERFEND macros to the beginning and end of your SAS language functions.
Add %PERFSTRT and %PERFSTOP macros around key events, such as procedures or DATA step functions.
Specify the SAS macro variable _armexec=1 in a SAS configuration file to enable or disable ARM.
The SAS logging facility contains transaction metrics for key events. The output destination, output format, and quantity of the information can be defined in a file appender.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.