Skip to content

Commit

Permalink
Update perf_counter() to time() due to bug in Python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
hannah-martinez committed Jun 6, 2024
1 parent d345d3c commit 48e5222
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def publish(self) -> AsyncGenerator:
break

yield self.OUTPUT, LoadTestSample(
_timestamp=time.perf_counter(),
_timestamp=time.time(),
counter=self.counter,
dynamic_data=np.zeros(
int(self.SETTINGS.dynamic_size // 8), dtype=np.float32
Expand Down Expand Up @@ -101,7 +101,7 @@ async def receive(self, sample: LoadTestSample) -> None:
f"{sample.counter - self.STATE.counter-1} samples skipped!"
)
self.STATE.received_data.append(
(sample._timestamp, time.perf_counter(), sample.counter)
(sample._timestamp, time.time(), sample.counter)
)
self.STATE.counter = sample.counter

Expand Down

0 comments on commit 48e5222

Please sign in to comment.