|
|
(7 intermediate revisions by 4 users not shown) |
Line 1: |
Line 1: |
| <span style="font-size:120%; color:black"><b>Rate per second of specified Login statistic for two UserStatisti</b></span>
| | #REDIRECT [[Rate and RatePerSecond (UserStatistics functions)]] |
| [[Category:UserStatistics methods|Rate function]] | |
| [[Category:System methods]]
| |
| <!--DPL?? Category:UserStatistics methods|Rate function: Rate per second of specified Login statistic for two UserStatisti-->
| |
| <!--DPL?? Category:System methods|Rate (UserStatistics function): Rate per second of specified Login statistic for two UserStatisti-->
| |
| <p>
| |
| Rate is a member of the [[UserStatistics class]].
| |
| </p>
| |
| | |
| This function returns the difference in statistic values between one UserStatistics
| |
| object and another divided by the number of seconds between the time
| |
| the two UserStatistics objects were instantiated.
| |
| | |
| The Rate method reports the rate of a ''Model 204'' user [[UserStatistics class#login|Login]] (also called “Final”) statistic.
| |
| The method cancels the request if it is applied to a statistic
| |
| that is exclusively a [[UserStatistics class#request|Request
| |
| statistic]].
| |
| | |
| '''RatePerSecond''' is a synonym for <tt>Rate</tt>.
| |
| ===Syntax===
| |
| %num = %ustat:Rate(%ustatOld, statistic)
| |
| ===Syntax terms===
| |
| <dl>
| |
| <dt><i>%num</i>
| |
| <dd>A numeric variable to contain the rate for the specified statistic.
| |
| <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><i>statistic</i>
| |
| <dd>This case-independent string contains the name of a ''Model 204'' user Login statistic.
| |
| All other names return an UnknownStatistic exception.
| |
| | |
| </dl>
| |
| ===Usage Notes===
| |
| <ul>
| |
| <li>The statistics UpdtTime(MS) and LongupdTime(MS) can also be specified
| |
| without the parentheses: for example,
| |
| UpdtTimeMs and LongUpdtimeMs, respectively.
| |
| <li>Request statistics are not valid for the Rate 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>Some Login statistics (like PCPU) don't really make sense as a rate, but
| |
| the Rate method returns a rate anyway.
| |
| <li>All rates are rounded to thousandths, except for the CPU statistic.
| |
| The units for CPU are milliseconds, so
| |
| CPU rates are rounded to thousandths of a millisecond.
| |
| <li>To get rates with a divisor other than time, use the [[Difference (UserStatistics function)|Difference]] function.
| |
| For example:
| |
| <pre>
| |
| %dkrdPerDkpr = %stat:difference(%statOld, 'DKRD') / -
| |
| %stat:difference(%statOld, 'DKPR')
| |
| </pre>
| |
| </ul>
| |
| ===Examples===
| |
| | |
| The following statement returns the rate for DKRD
| |
| over the interval from the creation of %ustatOld to the creation of %ustat:
| |
| <pre>
| |
| %dkrdPerSecond = %stat:difference(%statOld, 'dkrd')
| |
| </pre>
| |