We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0bcad8 commit fffda1dCopy full SHA for fffda1d
firebird/driver/core.py
@@ -1469,10 +1469,10 @@ def fetches(self) -> int:
1469
"""
1470
return self.get_info(DbInfoCode.FETCHES)
1471
@property
1472
- def cache_hit_ratio(self) -> int:
+ def cache_hit_ratio(self) -> float:
1473
"""Cache hit ratio = 1 - (reads / fetches).
1474
1475
- return 1 - (self.reads / self.fetches)
+ return (1 - (self.reads / self.fetches)) if self.fetches else 1.0
1476
1477
def writes(self) -> int:
1478
"""Current I/O statistics - Writes from page cache to disk.
0 commit comments