RequestToString (UserStatistics function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (match syntax table to syntax template, tags and edits)
Line 1: Line 1:
{{Template:UserStatistics:RequestToString subtitle}}
{{Template:UserStatistics:RequestToString subtitle}}
The <var>RequestToString</var> method returns the values of the <var>[[UserStatistics class#request|Request]]</var> statistics in the method <var>UserStatistics</var> object.  By default, it will only print those <var>Request</var> statistics with non-zero values; but, optionally, may print all (including zero) <var>Request</var> statistics.


This method returns the values of the [[UserStatistics class#request|Request statistics]]
in the method UserStatistics object.
It prints all Request statistics with non-zero values (by default),
or it prints all Request statistics (as an option).
==Syntax==
==Syntax==
{{Template:UserStatistics:RequestToString syntax}}
{{Template:UserStatistics:RequestToString syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th><i>%ls</i></th>
<tr><th>%string</th>
<td>A longstring variable to contain the listing of the values of the Request statistics. </td></tr>
<td>A <var>longstring</var> variable to contain the listing of the values of the <var>Request</var> statistics.</td></tr>
<tr><th><i>%ustat</i></th>
<tr><th>userStatistics</th>
<td>A UserStatistics object variable. </td></tr>
<td>A <var>UserStatistics</var> object variable.</td></tr>
<tr><th><b>Zeros= </b><i>bool</i></th>
<tr><th>Zeros</th>
<td>This name required argument (<tt>Zeros</tt>) is a boolean value that indicates whether statistics with a zero value should be included in the returned data. Zeros is an optional argument that defaults to <tt>False</tt>, which results in the inclusion of only statistics with non-zero values.</td></tr>
<td>This <var>[[Methods#Named parameters|Name-Required]]</var> argument (<var class="term">Zeros</var>) is a <var>[[Boolean]]</var> value that indicates whether statistics with a zero value should be included in the returned data. <var class="term">Zeros</var> is an optional argument that defaults to <var>False</var>, which results in the inclusion of only statistics with non-zero values.</td></tr>
<tr><th>NamesToLower</th><td>This <var>[[Methods#Named parameters|Name-Required]]</var> argument is a <var>[[Boolean]]</var> value that indicates whether the returned <var class="product">Model 204</var> statistic names, which are normally all uppercase, should be returned as lowercase.  This is an optional argument which defaults to <var>False</var>.</td></tr>
<tr><th>NamesToLower</th><td>This <var>Name-Required</var> argument is a <var>Boolean</var> value that indicates whether the returned <var class="product">Model 204</var> statistic names, which are normally all uppercase, should be returned as lowercase.  This is an optional argument which defaults to <var>False</var>.</td></tr>
</table>
</table>


==Usage notes==
<ul>
<li>The [[LoginToString (UserStatistics function)|LoginToString]] function
returns the values of the [[UserStatistics class#login|Login]]
(also called &amp;amp;ldquo;Final&amp;amp;rdquo;) statistics.
in the UserStatistics object.
The [[ToString (UserStatistics function)|ToString]] function
returns the values of the Login and the Request statistics in the object.
</ul>
==Examples==
==Examples==
 
<ol><li>
The following example of non-zero Request statistics is produced by a
The following example of non-zero Request statistics is produced by a:
<br>
<p class="code">print %ustat:requestToString</p>
<tt>Print %ustat:requestToString</tt> statement.
statement. The output line wrapping is altered for display purposes.
The output line wrapping is altered for display purposes.
<p class="output">time='20080730102646772' userNumber=6 loginTime='200807301-
<p class="code">time='20080730102646772' userNumber=6 loginTime='200807301-
02645880' ntbl=10 qtbl=29 stbl=524 vtbl=51 pdl=508 cnct=1 -
02645880' ntbl=10 qtbl=29 stbl=524 vtbl=51 pdl=508 cnct=1 -
cpu=887 out=1 slic=71 pcpu=996 rqtm=889 dkpr=124750 objswa-
cpu=887 out=1 slic=71 pcpu=996 rqtm=889 dkpr=124750 objswa-
p=250247
p=250247
</p>
</p></ol>
 
==See also==
==See also==
<ul><li><var>[[LoginToString (UserStatistics function)|LoginToString]]</var> returns the values of the <var>[[UserStatistics class#login|Login]]</var> (also called "Final") statistics in the <var>UserStatistics</var> object.
<li><var>[[ToString (UserStatistics function)|ToString]]</var> returns the values of the <var>Login</var> and the <var>Request</var> statistics in the object.
</ul>
{{Template:UserStatistics:RequestToString footer}}
{{Template:UserStatistics:RequestToString footer}}

Revision as of 10:02, 31 March 2011

Request statistics in string format (UserStatistics class)

The RequestToString method returns the values of the Request statistics in the method UserStatistics object. By default, it will only print those Request statistics with non-zero values; but, optionally, may print all (including zero) Request statistics.

Syntax

%string = userStatistics:RequestToString[( [Zeros= boolean], - [NamesToLower= boolean])]

Syntax terms

%string A longstring variable to contain the listing of the values of the Request statistics.
userStatistics A UserStatistics object variable.
Zeros This Name-Required argument (Zeros) is a Boolean value that indicates whether statistics with a zero value should be included in the returned data. Zeros is an optional argument that defaults to False, which results in the inclusion of only statistics with non-zero values.
NamesToLowerThis Name-Required argument is a Boolean value that indicates whether the returned Model 204 statistic names, which are normally all uppercase, should be returned as lowercase. This is an optional argument which defaults to False.

Examples

  1. The following example of non-zero Request statistics is produced by a:

    print %ustat:requestToString

    statement. The output line wrapping is altered for display purposes.

    time='20080730102646772' userNumber=6 loginTime='200807301- 02645880' ntbl=10 qtbl=29 stbl=524 vtbl=51 pdl=508 cnct=1 - cpu=887 out=1 slic=71 pcpu=996 rqtm=889 dkpr=124750 objswa- p=250247

See also

  • LoginToString returns the values of the Login (also called "Final") statistics in the UserStatistics object.
  • ToString returns the values of the Login and the Request statistics in the object.