Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

### Fixed
- Measure `ping()` response time with `time.perf_counter()` instead of
`time.time()`. On Windows with Python 3.12 and older the latter has a
resolution of 15.6 ms, so `ping()` could return `0.0` (PR #350).

## [1.3.0] - 2026-08-17

Expand Down
4 changes: 2 additions & 2 deletions tarantool/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1910,9 +1910,9 @@ def ping(self, notime=False):
"""

request = RequestPing(self)
start_time = time.time()
start_time = time.perf_counter()
self._send_request(request)
finish_time = time.time()
finish_time = time.perf_counter()

if notime:
return "Success"
Expand Down
3 changes: 0 additions & 3 deletions test/suites/test_dml.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,6 @@ def test_05_ping(self):
# Simple ping test
# * No exceptions are raised
# * Ping time > 0
if sys.platform.startswith("win"):
self.skipTest("Windows clock precision causes test to fail sometimes, see #214")

self.assertTrue(self.con.ping() > 0)
self.assertEqual(self.con.ping(notime=True), "Success")

Expand Down
Loading