MCPcopy Create free account
hub / github.com/tox-dev/filelock / _open_descriptors

Function _open_descriptors

tasks/benchmark.py:205–209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

203
204
205def _open_descriptors() -> int:
206 for directory in ("/proc/self/fd", "/dev/fd"):
207 with suppress(OSError):
208 return sum(1 for _ in Path(directory).iterdir())
209 return 0 # pragma: no cover # neither procfs nor /dev/fd exists on this platform
210
211
212def _report(samples: list[Sample]) -> None:

Callers 1

_descriptor_growthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected