ToString (UserStatistics function): Difference between revisions
m (→Examples) |
m (→Examples) |
||
Line 1: | Line 1: | ||
{{Template:UserStatistics:ToString subtitle}} | |||
This method prints the values of the statistics in the method UserStatistics | This method prints the values of the statistics in the method UserStatistics | ||
Line 11: | Line 5: | ||
It prints all statistics with non-zero values (by default), or it prints | It prints all statistics with non-zero values (by default), or it prints | ||
all statistics (as an option). | all statistics (as an option). | ||
==Syntax== | |||
{{Template:UserStatistics:ToString syntax}} | |||
===Syntax terms=== | ===Syntax terms=== | ||
<dl> | <dl> | ||
Line 28: | Line 22: | ||
</dl> | </dl> | ||
==Usage notes== | |||
<ul> | <ul> | ||
<li>The ToString method can be applied implicitly: | <li>The ToString method can be applied implicitly: | ||
Line 40: | Line 34: | ||
</ul> | </ul> | ||
==Examples== | |||
The following display of non-zero Login and Request statistics is produced by a | The following display of non-zero Login and Request statistics is produced by a | ||
Line 56: | Line 50: | ||
A <tt>Print %ustat:ToString(Zeros=true)</tt> statement would | A <tt>Print %ustat:ToString(Zeros=true)</tt> statement would | ||
print all the statistics, including those with a <tt>0</tt> value. | print all the statistics, including those with a <tt>0</tt> value. | ||
==See also== | |||
{{Template:UserStatistics:ToString footer}} |
Revision as of 20:42, 14 March 2011
Print UserStatistics values (UserStatistics class)
This method prints the values of the statistics in the method UserStatistics
object.
It prints all statistics with non-zero values (by default), or it prints
all statistics (as an option).
Syntax
%string = userStatistics:ToString[( [Zeros= boolean], [NamesToLower= boolean])]
Syntax terms
- %ls
- A longstring variable to contain the listing of the values of the statistics.
- %ustat
- A UserStatistics object variable.
- Zeros= bool
- 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.
Usage notes
- The ToString method can be applied implicitly: simply Print (or Audit) an object variable, and the ToString method is automatically applied to the object. Print %statobject is equivalent to Print %statobject:ToString.
- The LoginToString function returns the values of the Login statistics in the UserStatistics object. The RequestToString function returns the values of the Request statistics in the object.
Examples
The following display of non-zero Login and Request statistics is produced by a
Print %ustat statement.
The output line wrapping is altered for display purposes.
time='20080730102646772' userNumber=6 loginTime='20080730- 102645880' login: 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 request: ntbl=10 qtbl=29 stbl=524 vtbl- =51 pdl=508 cnct=1 cpu=887 out=1 slic=71 pcpu=996 rqtm=88- 9 dkpr=124750 objswap=250247
A Print %ustat:ToString(Zeros=true) statement would print all the statistics, including those with a 0 value.