Categories and Masks
A statistical category is a general definition that determines how to calculate a statistic on the basis of one or two lists of actions (masks) supplied as separate elements of a statistical type.
Subject of Calculation
The aggregated values discussed here are calculated on the basis of a subject specified in the definition of a statistical type, which can be either a DN action or the status of an object. Because statuses are merely highest-priority actions, the computations are the same for any subject, except for the TotalNumber, TotalTime, MaxTime, MinTime, and TotalAdjustedTime aggregated values (see the next section). Aggregated custom values cannot be computed on the basis of status.
Aggregated Values
The actions listed in a mask are used to maintain aggregated values. Every kind of aggregated value is available as a category. Other categories calculate statistics by using an additional computation that is based on aggregated values.
Historical aggregated values are based on statuses and actions during a specified interval (configured as a time profile). Current aggregated values are based only on statuses and durable actions that occur at the current moment; instantaneous actions that are listed in the mask are ignored. These values do not depend on computation intervals.
Historical and Current Aggregated Values
Historical | Current |
---|---|
TotalNumber |
CurrentNumber |
TotalTime |
CurrentTime |
MaxTime | CurrentMaxTime |
MaxNumber | |
MinTime | CurrentMinTime |
MinNumber | |
CurrentAverageTime |
Aggregated Values using TimeRanges
For historical and current statistical categories that use time ranges (namely, TotalNumberInTimeRange, TotalNumberInTimeRangePercentage, ServiceFactor1, CurrentNumberInTimeRange, and CurrentNumberInTimeRangePercentage), Stat Server maintains the restricted aggregated values listed below.
Aggregated Values using TimeRanges
Historical | Current |
---|---|
TotalNumberInTimeRange | CurrentNumberInTimeRange |
TotalTimeInTimeRange | |
ServiceFactor1 |
Averages of Current Values
Averages of current values are based on an average number or duration of durable actions listed in the mask that are going on at the current moment or ended during the interval from which the statistic is calculated; instantaneous actions listed in the mask are ignored.
The two kinds of averages of current values are:
Aggregated Custom Values
Aggregated custom values are used for computing custom-value statistical categories. They parallel aggregated time values; however, they do not aggregate duration values. Values are obtained from evaluating custom formulas on the UserData structure of the interaction to which an action is related, or on the data attached to the EventUserEvent TEvent for the UserEvent action. The syntax of custom formulas is described in Custom-Value Statistical Types.
The evaluation of custom formulas, which is conducted according to different rules for different classes of actions, is described in detail in Custom Formulas. Aggregated custom values depend not only on the mask and, for historical values, the interval from which the statistic is calculated, but also on the specified custom formula.
Accordingly, there are three kinds of historical aggregated custom values and three kinds of current aggregated custom values, which are provided below:
Historical | Current |
---|---|
TotalCustomValue | CurrentCustomValue |
MaxCustomValue | CurrentMaxCustomValue |
MinCustomValue | Current MinCustomValue |
Filtered, Aggregated Values
When a filter is set for a statistical type, only those actions for which the evaluated filter expression is true are considered when calculating the aggregated values.
The filter expression is evaluated over the UserData structure that belongs to the action or status. For instantaneous actions or durable actions that have ended, the UserData structure is the same as the last UserData structure received from T-Server with one of the following T-Library events:
- The event that caused the action’s occurrence or start
- The event that caused the action to end
- Event EventAttachedDataChanged received for the DN while the action was in progress (for durable actions only)
A DN status inherits the UserData structure of the action that causes the status. Because more than one action of the same kind can occur simultaneously for the same DN, the definition of the UserData that belong to a status cannot be predetermined. Caution is advised when filtered, aggregated values are computed with a subject of DN status.
Similarly, an agent or place status inherits the UserData structure of the DN status that causes it. The LoggedOut agent status has no attached UserData. This definition is even less predetermined than the previous one; computing filtered, aggregated values with a subject of agent or place status is strongly discouraged.
Group status carries no UserData structure; if a filtered, aggregated value is requested at this subject level, the filter is ignored.
The CurrentState category does not take filters into account. Although you can use the EstimWaitTime statistical category with filters, its values lose any intuitive meaning.
Formula
Starting with the 8.5.106 release, Stat Server supports statistical category Formula. This statistical category allows you to create customized versions of the existing hard-coded categories by combining different statistical aggregates. See Formula for more information.