-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
None
-
3
-
TBD
-
None
-
None
-
None
-
None
-
None
-
None
-
None
{TrafficRecordingPacket}
currently holds a
{Date_t}.
The recording generates this using SystemClockSource. This is the system clock, which is non-monotonic and can jump or be smeared by NTP.
When replaying these events, we don't actually need to know the wall clock time for every operation, only some offset from when the recording started.
offset = current time - replay start time
Then the desired time for an operation to be executed is simply:
desired time = recording start time + operation offset
This can all be done under steady_clock, avoiding any shifting due to NTP or other changes to the system clock.
—
When this ticket is complete:
- {TrafficRecorderPacket}
will store an offset (e.g., std::duration or uint64_t count of milliseconds)
- TrafficReaderPacket will also hold this offset type.
- {TrafficRecorder}
will store a start time (from steady_clock::now()).
- TrafficRecorder::observe will use steady_clock::now() and compute the offset from the start time