The %RMPROINT macro converts metrics that are considered
counters or deltas to rates. A counter is a metric whose value is
constantly increasing. A delta is a metric whose value represents
the difference between the value of a counter at the start and end
of an interval of time. The rate is determined by taking the delta
metric (or by calculating the delta from the counter) and dividing
it by the duration of the interval. The following table lists the
counters that are converted to rates for the NTSMF Adapter.
List of Counters That Are Converted to Rates for NTSMF Adapters
The following table
lists the counters that are converted to rates for the SAR Adapter.
List of Counters That Are Converted to Rates for SAR Adapters
For example, if you
have recorded odometer mileage and the start time of each mileage
reading, then the counter is mileage. When this macro is executed,
the duration is determined by calculating the difference between the
start times of one observation and the preceding observation. Then,
the number of miles per second can be calculated for each observation. To
calculate the number of miles per second, find the difference between
the odometer mileage of one observation and the mileage of the preceding
observation, and then divide the result by the duration in seconds.
A counter continues
increasing across all intervals until it reaches its maximum value
and then, typically, it resets to zero and starts again. The counter
maximums are 65,536 (for a 16-bit counter), 4,294,967,296 (for a 32-bit
counter), and 18,446,744,073,709,551,616 (for a 64-bit counter). Using
the previous and current value of the counter and knowing the maximum
limit for that particular counter, it is possible to calculate the
rate for that interval, based on these assumptions:
-
If the previous value is smaller
than the current value, it is assumed that the counter has not reset.
-
If the previous value is larger
than the current value, it is assumed that the counter has reset one
time.
Note: For information about “Length
and Precision of Variables” when using any 64-bit counter,
see the SAS Companion documentation for your host.