DifferenceToString (UserStatistics function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (here a tag, there a tag)
Line 1: Line 1:
{{Template:UserStatistics:DifferenceToString subtitle}}
{{Template:UserStatistics:DifferenceToString subtitle}}
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.
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 <var>Login</var> statistics including those with zero values.
   
   
==Syntax==
==Syntax==
Line 14: Line 14:
<tr><th>Zeros</th>
<tr><th>Zeros</th>
<td>This <var>[[Methods#Named parameters|Name-Required]]</var> argument is a <var>[[boolean]]</var> value that indicates whether differences with a zero value should be included in the returned data. <var class="term">Zeros</var> is an optional argument that defaults to <code>False</code>, which results in non-zero values only being included.</td></tr>
<td>This <var>[[Methods#Named parameters|Name-Required]]</var> argument is a <var>[[boolean]]</var> value that indicates whether differences with a zero value should be included in the returned data. <var class="term">Zeros</var> is an optional argument that defaults to <code>False</code>, which results in non-zero values only being included.</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>



Revision as of 10:07, 31 March 2011

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.
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.

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

  1. 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.