DifferenceToString (UserStatistics function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
 
(18 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<span style="font-size:120%; color:black"><b>Longstring with difference of all Login statistic v</b></span>
{{Template:UserStatistics:DifferenceToString subtitle}}
[[Category:UserStatistics methods|DifferenceToString function]]
The <var>DifferenceToString</var> method returns, to a <var>longstring</var>, the difference in values between one <var>[[UserStatistics_class|UserStatistics]]</var> object and another, for all [[UserStatistics class#login|Login]] (also called "Final") statistics with non-zero values (by default) or for all Login statistics including those with zero values.
[[Category:System methods]]
<!--DPL?? Category:UserStatistics methods|DifferenceToString function: Longstring with difference of all Login statistic v-->
==Syntax==
<!--DPL?? Category:System methods|DifferenceToString (UserStatistics function): Longstring with difference of all Login statistic v-->
{{Template:UserStatistics:DifferenceToString syntax}}
<p>
 
DifferenceToString is a member of the [[UserStatistics class]].
===Syntax terms===
</p>
<table class="syntaxTable">
<tr><th>%string</th>
<td>A <var>longstring</var> variable to contain the listing of the difference values of the Login statistics. </td></tr>
 
<tr><th>userStatatistics</th>
<td>A <var>UserStatistics</var> object variable. </td></tr>
 
<tr><th>ustatOld</th>
<td>An older <var>UserStatistics</var> object variable for the same user login as <var class="term">userStatatistics</var>. </td></tr>


This method returns to a longstring the difference in values between one UserStatistics
<tr><th><var>Zeros</var></th>
object and another for all Login statistics with non-zero values (by default)
<td>This [[Methods#Named parameters|name required]] argument is a <var>[[Enumerations#Using Boolean enumerations|Boolean]]</var> value that indicates whether differences 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 non-zero values only being included.</td></tr>
or for all Login statistics (as an option).


See the description of [[UserStatistics class#login|Login statistics]].
<tr><th><var>NamesToLower</var></th>
===Syntax===
<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 that defaults to <var>False</var>.</td></tr>
  %ls = %ustat:DifferenceToString(%ustatOld [,&nbsp;Zeros=bool])
</table>
===Syntax terms===
<dl>
<dt><i>%ls</i>
<dd>A longstring variable to contain the listing of the difference values of the
Login statistics.
<dt><i>%ustat</i>
<dd>A UserStatistics object variable.
<dt><i>%ustatOld</i>
<dd>An older UserStatistics object variable for the same user login
as ''%ustat''.
<dt><b>Zeros= </b><i>bool</i>
<dd>This name required argument (<tt>Zeros</tt>) is a boolean value
that indicates whether differences 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 non-zero values only being included.


</dl>
==Usage notes==
===Usage Notes===
<ul>
<ul>
<li>[[UserStatistics class#request|Request statistics]]
<li>[[UserStatistics class#request|Request statistics]] are not valid for <var>DifferenceToString</var> since most don't really make sense for this operation. The Request statistics for which it does make sense (<var>CPU</var>, for example) have corresponding Login statistics that return the exact same difference.
are not valid for the Difference method since most don't
really make sense for this operation.
The Request statistics for which it does make sense (CPU, for example)
have corresponding Login statistics that return the exact same difference.
<li>The [[Difference (UserStatistics function)|Difference]] function returns the value
differences between two UserStatistics objects for the Login statistic you specify.
The [[DifferenceToXmlDoc (UserStatistics function)|DifferenceToXmlDoc]] function
returns to an XmlDoc object the differences for all, or all non-zero,
Login statistics.
</ul>
</ul>
===Examples===


The following statement returns all the Login statistics that have
==Examples==
non-zero difference values over the interval from the creation of
The following statement returns all the Login statistics that have non-zero difference values over the interval from the creation of <code>%ustat1</code> to the creation of <code>%ustat2</code>:
%ustat1 to the creation of %ustat2:
<p class="code">print %ustat2:differenceToString(%ustat1)
<pre>
</p>
    Print %ustat2:differenceToString(%ustat1)
 
</pre>
==See also==
<ul>
<li><var>[[Difference (UserStatistics function)|Difference]]</var> which returns the value differences between two <var>UserStatistics</var> objects for the Login statistic you specify.
<li><var>[[DifferenceToXmlDoc (UserStatistics function)|DifferenceToXmlDoc]]</var> which returns to an <var>[[XmlDoc_class#The_XmlDoc_class|XmlDoc]]</var> object the differences for all, or all non-zero, Login statistics.
</ul>
{{Template:UserStatistics:DifferenceToString footer}}

Latest revision as of 21:29, 20 November 2012

Login timestamps difference in string format (UserStatistics class)

The DifferenceToString method returns, to a longstring, the difference in values between one UserStatistics object and another, for all Login (also called "Final") statistics with non-zero values (by default) or for all Login statistics including those with zero values.

Syntax

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

Syntax terms

%string A longstring variable to contain the listing of the difference values of the Login statistics.
userStatatistics A UserStatistics object variable.
ustatOld An older UserStatistics object variable for the same user login as userStatatistics.
Zeros This name required argument is a Boolean value that indicates whether differences with a zero value should be included in the returned data. Zeros is an optional argument that defaults to False, which results in non-zero values only being included.
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 that defaults to False.

Usage notes

  • Request statistics are not valid for DifferenceToString since most don't really make sense for this operation. The Request statistics for which it does make sense (CPU, for example) have corresponding Login statistics that return the exact same difference.

Examples

The following statement returns all the Login statistics that have non-zero difference values over the interval from the creation of %ustat1 to the creation of %ustat2:

print %ustat2:differenceToString(%ustat1)

See also

  • Difference which returns the value differences between two UserStatistics objects for the Login statistic you specify.
  • DifferenceToXmlDoc which returns to an XmlDoc object the differences for all, or all non-zero, Login statistics.