$Slstats: Difference between revisions
(Automatically generated page update) |
mNo edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<p>The $ | <p> | ||
The <var>$Slstats</var> function lets you evaluate the relative expense of different processes in a single request by resetting the recording of [[Using system statistics#User since-last statistics|since-last statistics]] at the point in a request where the function call appears.</p> | |||
<p>The format of the $ | |||
<p class="code">$ | ==Syntax== | ||
<p> | |||
The format of the <var>$Slstats</var> function is:</p> | |||
<p class="code">$Slstats(['<span class="term">string</span>' | <span class="term">%variable</span>]) | |||
</p> | </p> | ||
<p><var class="product">Model 204</var> uses the first four characters in the quoted string, or in the current value of the %variable, as a label to identify the section of the request to which the corresponding since-last audit trail entry applies. </p> | <p> | ||
<p>The default value for the argument is EVAL. Because the recording of since-last statistics begins automatically with request execution, the first set of since-last statistics in the audit trail for any request is always be labelled EVAL. This is true even if the first statement in a request contains a $ | <var class="product">Model 204</var> uses the first four characters in the quoted string, or in the current value of the %variable, as a label to identify the section of the request to which the corresponding since-last audit trail entry applies. </p> | ||
<p>You can call the $ | <p> | ||
<p class="code">% | The default value for the argument is <var>EVAL</var>. Because the recording of since-last statistics begins automatically with request execution, the first set of since-last statistics in the audit trail for any request is always be labelled <code>EVAL</code>. This is true even if the first statement in a request contains a <var>$Slstats</var> call.</p> | ||
==Usage notes== | |||
<p> | |||
You can call the <var>$Slstats</var> function by embedding it in a <var>Print</var> statement or assigning it to a %variable. For example, the following statement initiates a new set of since-last statistics (labelled <code>FND1</code>) for the remainder of the request, or until the next <var>$Slstats</var> call appears:</p> | |||
<p class="code">%x = $slstats('FND1') | |||
</p> | </p> | ||
<p>Note | <p class="note"><b>Note:</b> Each invocation of <var>$Slstats</var> produces a new SMF (System Monitoring Facility) record. If the identifying label is specified, then it replaces <var>EVAL</var> in the SMF record, as it does in the audit trail.</p> | ||
<p>In addition to EVAL, there are several other labels generated by <var class="product">Model 204</var> for audit trail and SMF records. These include:</p> | <p> | ||
In addition to <code>EVAL</code>, there are several other labels generated by <var class="product">Model 204</var> for audit trail and SMF records. These include:</p> | |||
<p class="code">CMPL | <p class="code">CMPL | ||
COPY | COPY | ||
Line 18: | Line 27: | ||
REST | REST | ||
</p> | </p> | ||
<p>You can assume any label not listed above to be generated by an $ | <p> | ||
You can assume any label not listed above to be generated by an <var>$Slstats</var> call. (Note, however, that there is no prohibition against using the above labels with <var>$Slstats</var>.) For accounting purposes, any label generated by <var>$Slstats</var> should be included as EVAL statistics.</p> | |||
[[Category:SOUL $functions]] | [[Category:SOUL $functions]] |
Latest revision as of 19:22, 3 November 2014
The $Slstats function lets you evaluate the relative expense of different processes in a single request by resetting the recording of since-last statistics at the point in a request where the function call appears.
Syntax
The format of the $Slstats function is:
$Slstats(['string' | %variable])
Model 204 uses the first four characters in the quoted string, or in the current value of the %variable, as a label to identify the section of the request to which the corresponding since-last audit trail entry applies.
The default value for the argument is EVAL. Because the recording of since-last statistics begins automatically with request execution, the first set of since-last statistics in the audit trail for any request is always be labelled EVAL
. This is true even if the first statement in a request contains a $Slstats call.
Usage notes
You can call the $Slstats function by embedding it in a Print statement or assigning it to a %variable. For example, the following statement initiates a new set of since-last statistics (labelled FND1
) for the remainder of the request, or until the next $Slstats call appears:
%x = $slstats('FND1')
Note: Each invocation of $Slstats produces a new SMF (System Monitoring Facility) record. If the identifying label is specified, then it replaces EVAL in the SMF record, as it does in the audit trail.
In addition to EVAL
, there are several other labels generated by Model 204 for audit trail and SMF records. These include:
CMPL COPY DUMP EDIT LOAD REST
You can assume any label not listed above to be generated by an $Slstats call. (Note, however, that there is no prohibition against using the above labels with $Slstats.) For accounting purposes, any label generated by $Slstats should be included as EVAL statistics.