Page MenuHomePhabricator

Clean up some ordering and strata edge cases in Phrequent
ClosedPublic

Authored by epriestley on Oct 18 2013, 9:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 9, 6:39 AM
Unknown Object (File)
Mon, Dec 9, 4:14 AM
Unknown Object (File)
Mon, Dec 9, 4:14 AM
Unknown Object (File)
Mon, Dec 9, 4:14 AM
Unknown Object (File)
Mon, Dec 9, 4:14 AM
Unknown Object (File)
Thu, Dec 5, 12:31 AM
Unknown Object (File)
Sun, Dec 1, 12:54 PM
Unknown Object (File)
Wed, Nov 27, 2:33 AM
Subscribers

Details

Summary

Ref T3569. Two issues:

  1. Since sort() is not stable, instantaneous events (ending on the same second they start) would sometime sort wrong and produce the wrong results. Guarantee they sort correctly.
  2. Because events can end at any time, there are some additional special cases the algorithm didn't handle properly. Draw a bunch of ASCII art diagrams so these cases work properly.
Test Plan
  • No more fatal when tracking an object for the first time.
  • Unit tests.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

"Thank goodness for the ASCII art" the reviewer thought to himself. :D