Opened 7 years ago

Closed 7 years ago

#2785 closed defect (fixed)

perfdhcp sent/received durations do not appear to be accurate

Reported by: tmark Owned by: tmark
Priority: medium Milestone: Sprint-DHCP-20130411
Component: perfdhcp Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

perfdhcp expresses the packet sent and received times in an exchange pair, ostensibly, as a duration from the epoch. Using to_iso_string(time_duration) should result in:

HHMMSS.ffffff where it is hours, minutes, seconds. fractional seconds of the duration, so we should it expressed since the epoch. The actual values for hours, however is not accurate as can be seen from the following stdout excerpt:

sent / received: 53746523458.837044 / 53746523458.851693

which is 5374652 hours since the epoch. This value appears to be wrong as it equates roughly 613 years.

What would be more useful would be expressing the durations as "since process start time". It would also be helpful to display the packet sent and/or received as date/time to facilitate correlating these entries to server side logs/events.

Perhaps:

sent/received (sent timestamp) / (recvd timestamp) diff: (duration between)

there are any number of alternatives.

Subtickets

Attachments (1)

artifacts.tar.gz (1.6 KB) - added by tmark 7 years ago.
Test artifacts demonstrating correct behavior

Download all attachments as: .zip

Change History (10)

comment:1 Changed 7 years ago by stephen

  • Milestone changed from DHCP Outstanding Tasks to Sprint-DHCP-20130328

comment:2 Changed 7 years ago by tmark

  • Owner set to tmark
  • Status changed from new to accepted

comment:3 Changed 7 years ago by tmark

  • Status changed from accepted to assigned

Changed 7 years ago by tmark

Test artifacts demonstrating correct behavior

comment:4 Changed 7 years ago by tmark

  • Owner changed from tmark to UnAssigned
  • Status changed from assigned to reviewing

The packet sent and received times are now being calculated as time since perfdhcp was started. The attached artifact tar ball verifies the correct behavior. Using the process start time makes these numbers not only accurate, but more useful. Outputting actual timestamps made the output far too cluttered to be of use.

Suggested ChangeLog? entry is as follows:
"
5xx. [bug] tmark

Modified perfdhcp to calculate packet sent and received times
as time elapsed since perfdhcp start time. Previously they were
based on time since the epoch.
(Trac #2785, git fbfd9a49b562e3f5532e87ad801baf82c6b7a912)

"

comment:5 follow-up: Changed 7 years ago by jreed

For the ChangeLog? also mention what the "bug" was.

Also please consider pasting the details directly into the ticket comments and/or use per-file attachments instead of artifacts tarballs for later tickets. (I looked at the tarball.) It will be easier to quickly review and also the data can be searched via the ticket interface.

comment:6 in reply to: ↑ 5 Changed 7 years ago by tmark

Replying to jreed:

For the ChangeLog? also mention what the "bug" was.

Also please consider pasting the details directly into the ticket comments and/or use per-file attachments instead of artifacts tarballs for later tickets. (I looked at the tarball.) It will be easier to quickly review and also the data can be searched via the ticket interface.

Revised Changelog proposed:
"
5xx. [bug] tmark

Modified perfdhcp to calculate the times displayed for packet sent
and received as time elapsed since perfdhcp process start time.
Previously these times were based on time since the epoch, but
were not calulating correctly as well resulting in very large
numbers.
(Trac #2785, git fbfd9a49b562e3f5532e87ad801baf82c6b7a912)

"

Will attach files individually moving forward.

comment:7 Changed 7 years ago by stephen

  • Owner changed from UnAssigned to stephen

comment:8 Changed 7 years ago by stephen

  • Owner changed from stephen to tmark

Reviewed commit commit fbfd9a49b562e3f5532e87ad801baf82c6b7a912

ChangeLog message
Suggest change second sentence to something like:

Previously these were times since the start of the epoch.
However the large numbers involved caused loss of precision
in the calculation of the test statistics.

(I'm assuming that the problem was caused by differencing two very large numbers to try to get a very small number.)

All OK, please merge.

comment:9 Changed 7 years ago by tmark

  • Resolution set to fixed
  • Status changed from reviewing to closed

Changes merged. ChangeLog? entry altered as suggested.

Note: See TracTickets for help on using tickets.