LoginToString (UserStatistics function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
 
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Template:UserStatistics:LoginToString subtitle}}
{{Template:UserStatistics:LoginToString subtitle}}
The <var>LoginToString</var> function returns the values of the [[UserStatistics class#login|Login]] (also called "Final") statistics in the method <var>UserStatistics</var> object. By default, <var>LoginToString</var> will only include those Login statistics with non-zero values; but, as an option, it may include all (including zero) Login statistics.
This function returns the values of the [[UserStatistics class#login|Login]] (also called Final) statistics in the method UserStatistics object.
 
The method prints all Login statistics with non-zero values (by default),
or it prints all Login statistics (as an option).
==Syntax==
==Syntax==
{{Template:UserStatistics:LoginToString syntax}}
{{Template:UserStatistics:LoginToString 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 Login statistics. </td></tr>
<td>A <var>longstring</var> variable to contain the listing of the values of the <var>Login</var> statistics. </td></tr>
<tr><th><i>%ustat</i></th>
 
<td>A UserStatistics object variable. </td></tr>
<tr><th>userStatistics</th>
<tr><th><b>Zeros= </b><i>bool</i></th>
<td>A <var>UserStatistics</var> object variable. </td></tr>
<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>
 
<tr><th><var>Zeros</var></th>
<td>This <var>[[Notation conventions for methods#Named parameters|name required]] </var> argument 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>
 
<tr><th><var>NamesToLower</var></th>
<td>This <var>NameRequired</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==
 
==Examples==
The following example of non-zero <var>Login</var> statistics is produced by a
<code>print %ustat:loginToString(namesToLower=true)</code>
statement.  The output line wrapping is altered for display purposes.
<p class="output">time='20080902160613043' userNumber=20 loginTime='20080902094309010' cnct=1 sqrd=29 sqwr=4 sgmto=27 cpu=890 req=1 -
move=97 slic=71 audit=32 dkar=253 dkpr=124751 pcpu=996 objswap=250247
</p>
 
==See also==
<ul>
<ul>
<li>The [[RequestToString (UserStatistics function)|RequestToString]] function
<li><var>[[RequestToString (UserStatistics function)|RequestToString]]</var> returns the values of the <var>Request</var> statistics in the <var>UserStatistics</var> object.
returns the values of the Request statistics
<li><var>[[ToString (UserStatistics function)|ToString]]</var> returns the values of all the statistics in the object.
in the UserStatistics object.
The [[ToString (UserStatistics function)|ToString]] function
returns the values of all the statistics in the object.
</ul>
</ul>
==Examples==
The following example of non-zero Login statistics is produced by a
<br>
<tt>Print %ustat:loginToString</tt> statement.
The output line wrapping is altered for display purposes.
<p class="code"><nowiki>time='20080902160613043' userNumber=20 loginTime='2008090-
2094309010' cnct=1 sqrd=29 sqwr=4 sgmto=27 cpu=890 req=1 -
move=97 slic=71 audit=32 dkar=253 dkpr=124751 pcpu=996 ob-
jswap=250247
</nowiki></p>
==See also==
{{Template:UserStatistics:LoginToString footer}}
{{Template:UserStatistics:LoginToString footer}}

Latest revision as of 21:42, 20 November 2012

Login statistics in string format (UserStatistics class)

The LoginToString function returns the values of the Login (also called "Final") statistics in the method UserStatistics object. By default, LoginToString will only include those Login statistics with non-zero values; but, as an option, it may include all (including zero) Login statistics.

Syntax

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

Syntax terms

%string A longstring variable to contain the listing of the values of the Login statistics.
userStatistics A UserStatistics object variable.
Zeros This name required argument 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 NameRequired 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 Login statistics is produced by a print %ustat:loginToString(namesToLower=true) statement. The output line wrapping is altered for display purposes.

time='20080902160613043' userNumber=20 loginTime='20080902094309010' cnct=1 sqrd=29 sqwr=4 sgmto=27 cpu=890 req=1 - move=97 slic=71 audit=32 dkar=253 dkpr=124751 pcpu=996 objswap=250247

See also

  • RequestToString returns the values of the Request statistics in the UserStatistics object.
  • ToString returns the values of all the statistics in the object.