mirror of
https://github.com/python/cpython.git
synced 2026-04-14 15:50:50 +00:00
Remove PyThread_type_lock (now uses PyMutex internally). Add new benchmark options: - work_inside/work_outside: control work inside and outside the critical section to vary contention levels - num_locks: use multiple independent locks with threads assigned round-robin - total_iters: fixed iteration count per thread instead of time-based, useful for measuring fairness - num_acquisitions: lock acquisitions per loop iteration - random_locks: acquire random lock each iteration Also return elapsed time from benchmark_locks() and switch lockbench.py to use argparse. |
||
|---|---|---|
| .. | ||
| clinic | ||
| complex.c | ||
| interpreter.c | ||
| parts.h | ||
| pytime.c | ||
| README.txt | ||
| set.c | ||
| test_cases.c.h | ||
| test_critical_sections.c | ||
| test_lock.c | ||
| test_targets.h | ||
| testbytecodes.c | ||
Tests in this directory are compiled into the _testinternalcapi extension. The main file for the extension is Modules/_testinternalcapimodule.c, which calls `_PyTestInternalCapi_Init_*` from these functions. See Modules/_testcapi/README.txt for guideline when writing C test code.