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

Function _open_descriptors

tasks/benchmark.py:195–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193
194
195def _open_descriptors() -> int:
196 for directory in ("/proc/self/fd", "/dev/fd"):
197 with suppress(OSError):
198 return sum(1 for _ in Path(directory).iterdir())
199 return 0 # pragma: no cover # neither procfs nor /dev/fd exists on this platform
200
201
202def _report(samples: list[Sample]) -> None:

Callers 1

_descriptor_growthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected