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

Function _uncontended

tasks/benchmark.py:81–91  ·  view source on GitHub ↗
(root: Path)

Source from the content-addressed store, hash-verified

79
80
81def _uncontended(root: Path) -> list[Sample]:
82 samples: list[Sample] = []
83 for name, build in _backends(root):
84 lock = build()
85
86 def acquire_release(held: filelock.BaseFileLock = lock) -> None:
87 held.acquire()
88 held.release()
89
90 samples.append(_timed(f"acquire+release {name}", acquire_release, unit="us", scale=1e6))
91 return samples
92
93
94def _timeout_cpu(root: Path) -> Sample:

Callers 1

mainFunction · 0.85

Calls 3

_backendsFunction · 0.85
_timedFunction · 0.85
buildFunction · 0.70

Tested by

no test coverage detected