Skip to content

Commit 0b804ff

Browse files
committed
refactor: Drop inline comments from the stream-init clock swap
1 parent b5879b9 commit 0b804ff

2 files changed

Lines changed: 0 additions & 6 deletions

File tree

‎ldclient/impl/datasourcev2/async_streaming.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ def __init__(
123123
self._owned_session: Optional[aiohttp.ClientSession] = None
124124
self._running = False
125125
self._diagnostic_accumulator: Optional[DiagnosticAccumulator] = None
126-
# Monotonic-clock baseline for the current stream-init duration.
127126
self._connection_attempt_start_time: Optional[float] = None
128127

129128
def set_diagnostic_accumulator(self, diagnostic_accumulator: DiagnosticAccumulator):
@@ -261,8 +260,6 @@ async def _close_owned_session(self):
261260

262261
def _record_stream_init(self, failed: bool):
263262
if self._diagnostic_accumulator and self._connection_attempt_start_time is not None:
264-
# The reported timestamp stays on the wall clock; the duration is
265-
# measured on the monotonic clock so a wall-clock step cannot distort it.
266263
current_time = current_time_millis()
267264
elapsed = int(monotonic_seconds() * 1000) - int(self._connection_attempt_start_time * 1000)
268265
self._diagnostic_accumulator.record_stream_init(current_time, elapsed if elapsed >= 0 else 0, failed)

‎ldclient/impl/datasourcev2/streaming.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ def __init__(self,
132132
self._sse: Optional[SSEClient] = None
133133
self._running = False
134134
self._diagnostic_accumulator: Optional[DiagnosticAccumulator] = None
135-
# Monotonic-clock baseline for the current stream-init duration.
136135
self._connection_attempt_start_time: Optional[float] = None
137136

138137
def set_diagnostic_accumulator(self, diagnostic_accumulator: DiagnosticAccumulator):
@@ -260,8 +259,6 @@ def stop(self):
260259

261260
def _record_stream_init(self, failed: bool):
262261
if self._diagnostic_accumulator and self._connection_attempt_start_time is not None:
263-
# The reported timestamp stays on the wall clock; the duration is
264-
# measured on the monotonic clock so a wall-clock step cannot distort it.
265262
current_time = current_time_millis()
266263
elapsed = int(monotonic_seconds() * 1000) - int(self._connection_attempt_start_time * 1000)
267264
self._diagnostic_accumulator.record_stream_init(current_time, elapsed if elapsed >= 0 else 0, failed)

0 commit comments

Comments
 (0)