Jump to: navigation, search

Timestamps

Prior to Stat Server release 8.0, Stat Server relied on UTC time measured locally to timestamp events that were received from data sources (such as T-Server) and to update time-sensitive statistics. In practice, this local time could deviate significantly from the data source’s UTC time which reflected the moment of event transmission.

Timestamp of the TEvent

Network latencies and load-related delays explain the gap between these two timestamps and largely account for the discrepancies in statistical values reported by other Genesys Reporting applications for comparable statistics.

The setting of the UseSourceTimeStamps stat type configuration option (described in the Stat Type Configuration Options table) enables you to control which timestamp Stat Server uses; however, it should be noted that this aspect of time alone does not cause all of the differences in reported statistical values. Stat Server uses a mix of local and source timestamps to compute the duration of a terminating action for any statistic.

For example, Stat Server adjusts all actions occurring for a statistic to the local time in which the statistic was opened. But when the actions terminate, their timestamps and, therefore their durations, are measured in:

  • Local time, when UseSourceTimeStamps has been set to No.
  • Both local and source time, when UseSourceTimeStamps has been set to Yes. Stat Server adjusts action duration in this scenario as follows:
    action_end – max(action_start,statistic_creation_local_timestamp)
    where action_end is measured in source time for the given statistic.

Source Timestamp Algorithm

Starting with release 8.0, Stat Server maintains the following two new attributes internally for all actions and object relationships:

  • Source start—derived from the Time attribute of TEvents, the event_time attribute of Interaction Server events, and the cfgTimestamp attribute of Configuration Server events.
  • Source end—derived in the same manner as Source start.

Stat Server attributes these to each action regardless of the setting of the UseSourceTimeStamps option. When UseSourceTimeStamps is set to true, Stat Server references the values of these attributes to calculate statistic duration.

Important

The values that Stat Server writes to the Stat Server database do not reflect source timestamps.

Figure below illustrates how Stat Server computes the duration of a CallInbound action on an agent group when UseSourceTimeStamps=true. Note that Stat Server uses seconds-level precision, truncating milliseconds before computing duration.

  • Action source start = maximum value among:
    • T-Server timestamp of agent’s login
    • Configuration Server timestamp when the agent was added to the group.
    • T-Server timestamp associated with EventEstablished for the call.
  • Action source end = minimum value among:
    • T-Server timestamp of agent logout
    • Configuration Server timestamp when the agent was removed from the group.
    • T-Server timestamp associated with EventReleased for the call.

Note that Stat Server references the timestamps from at least two sources to determine duration.

How Stat Server Computes CallInbound Example

The following special circumstances require Stat Server to reference both the source and local timestamps for action generation when UseSourceTimeStamps is set to true:

  • When Stat Server generates actions while reading initial configuration. Stat Server reads configuration data in synchronous mode, so Stat Server sets Source start to the value of the local timestamp.
  • When actions terminate while the connection to the event-supplying server is lost. Corresponding events do not contain the source timestamp, so Stat Server references its local timestamp to compute action duration.
    For example, T-Library detects that the connection with T-Server is lost and generates EventServerDisconnected.
  • When statistics use internal timestamps. These internal timestamps might be set to local timestamps as in the case of initial value calculations and resets. For an example of how Stat Server references both local and source time, see example at the top of the page.
This page was last edited on October 22, 2014, at 04:54.
Comments or questions about this documentation? Contact us for support!