RequestToString (UserStatistics function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
 
(14 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<span style="font-size:120%; color:black"><b>Longstring containing Request statistics of specified</b></span>
{{Template:UserStatistics:RequestToString subtitle}}
[[Category:UserStatistics methods|RequestToString function]]
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 Request statistics with non-zero values; but, as an option, it may print all (including zero) Request statistics.
<!--DPL?? Category:UserStatistics methods|RequestToString function: Longstring containing Request statistics of specified-->
 
<!--DPL?? Category:System methods|RequestToString (UserStatistics function): Longstring containing Request statistics of specified-->
==Syntax==
<p>
{{Template:UserStatistics:RequestToString syntax}}
RequestToString is a member of the [[UserStatistics class]].
</p>


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===
  %ls = %ustat:RequestToString([Zeros=bool])
===Syntax terms===
===Syntax terms===
<dl>
<table class="syntaxTable">
<dt><i>%ls</i>
<tr><th>%string</th>
<dd>A longstring variable to contain the listing of the values of the
<td>A <var>longstring</var> variable to contain the listing of the values of the <var>Request</var> statistics.</td></tr>
Request statistics.
 
<dt><i>%ustat</i>
<tr><th>userStatistics</th>
<dd>A UserStatistics object variable.
<td>A <var>UserStatistics</var> object variable.</td></tr>
<dt><b>Zeros= </b><i>bool</i>
 
<dd>This name required argument (<tt>Zeros</tt>) is a boolean value
<tr><th><var>Zeros</var></th>
that indicates whether statistics with a zero value should be included
<td>This [[Notation conventions for methods#Named parameters|name required]] argument (<var>Zeros</var>) is a <var>[[Enumerations#Using Boolean enumerations|Boolean]]</var> value that indicates whether statistics with a zero value should be included in the returned data. <var>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>
in the returned data.
 
Zeros is an optional argument that defaults to <tt>False</tt>, which
<tr><th><var>NamesToLower</var></th>
results in the inclusion of only statistics with non-zero values.
<td>This name required 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>
 
==Examples==
The following example of non-zero Request statistics is produced by a <code>print %ustat:requestToString</code>
statement:
<p class="output">time='20080730102646772' userNumber=6 loginTime='20080730102645880' ntbl=10 qtbl=29 stbl=524 vtbl=51 pdl=508 cnct=1 -
cpu=887 out=1 slic=71 pcpu=996 rqtm=889 dkpr=124750 objswap=250247
</p>


</dl>
==See also==
===Usage Notes===
<ul>
<ul>
<li>The [[LoginToString (UserStatistics function)|LoginToString]] function
<li><var>[[LoginToString (UserStatistics function)|LoginToString]]</var> returns the values of the [[UserStatistics class#login|Login]] (also called "Final") statistics in the <var>UserStatistics</var> object.
returns the values of the [[UserStatistics class#login|Login]]
 
(also called &ldquo;Final&rdquo;) statistics.
<li><var>[[ToString (UserStatistics function)|ToString]]</var> returns the values of the Login and the Request statistics in the object.
in the UserStatistics object.
The [[ToString (UserStatistics function)|ToString]] function
returns the values of the Login and the Request statistics in the object.
</ul>
</ul>
===Examples===
{{Template:UserStatistics:RequestToString footer}}
 
The following example of non-zero Request statistics is produced by a
<br>
<tt>Print %ustat:requestToString</tt> statement.
The output line wrapping is altered for display purposes.
<p class="code">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
</p>

Latest revision as of 21:58, 20 November 2012

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, as an option, it 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.
NamesToLower This 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

The following example of non-zero Request statistics is produced by a print %ustat:requestToString statement:

time='20080730102646772' userNumber=6 loginTime='20080730102645880' ntbl=10 qtbl=29 stbl=524 vtbl=51 pdl=508 cnct=1 - cpu=887 out=1 slic=71 pcpu=996 rqtm=889 dkpr=124750 objswap=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.