Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Sv translation
languageen

The jtel System takes timestamps, when a particular event happens, down to the microsecond level of accuracy, if available.

This can result in some paradoxes, when the values are used in reporting.

Warning
  • Note, because of the real-time nature of the system particularly when dealing with calls, it is necessary to have timestamps of a high accuracy, to ensure that events are ordered correctly in the same order as they actually happened.
  • This is particularly important for systems which need to be certified for billing purposes.

Consider the following example, which could, for example, be the times an agent spent in a particular agent status during a day.

  • The actual values stored in the raw data are the times in microseconds.
  • The time in seconds is used to display a hours:minutes:seconds value in a report
    • This is calculated when the report is generated by rounding the microseconds value divided by 1000000 (the number of microseconds in one second)
  • The sums at the bottom are calculated in the report, by summing up the relevant column.
StatusTime in Status in MicrosecondsTime in Status in Seconds
Status 141,570,259,03341570
Status 2162,338,287162
Status 368,047,41068
Status 4258,951,950259
Status 5314,248,890314
Status 644,026,154,43044026
SUM86,400,000,00086399

As you can see, one second has gone missing, although the sums are numerically correct.

Info

So where did it go?

  • This is due to a cumulative number of microseconds which is greater than half a second, being rounded off when the number of seconds is calculated for each row.

An alternative could be to get the sum of the number of seconds from the sum of the microseconds (which is correct) and display the following:

StatusTime in Status in MicrosecondsTime in Status in Seconds
Status 141,570,259,03341570
Status 2162,338,287162
Status 368,047,41068
Status 4258,951,950259
Status 5314,248,890314
Status 644,026,154,43044026
SUM86,400,000,00086400

However, astute readers will note that 41570 + 162 + 68 + 259 + 314 + 44026 does not in fact equal 86400.

Info

This is called the rounding paradox.

So what to do? Unfortunately, there is no simple or nice way to deal with this.

  • You either live with the missing second(s) in the totals
  • Or you display incorrect values somewhere in the individual data rows, by adding the missing seconds from the total those rows

We here at jtel have decided to go with the first method.

So sometimes the sums in jtel reports may not add up exactly as you would expect.

Now, at least you know why!

We ask for your understanding regarding that you consider this circumstance and for its consideration on your side, before you open up before opening a service ticket. Simply put: This mathematical fact can not be changed.



...