kvikio's thread pool is BS::thread_pool (cpp/include/kvikio/threadpool_wrapper.hpp), which already implements get_tasks_queued(), get_tasks_running(), and get_tasks_total(). Real-time utilization for the exact resource kvikio_nthreads (default 256) controls. None of it is exposed past kvikio::defaults::thread_pool() (cpp/include/kvikio/defaults.hpp). No C++ wrapper, no Python binding. python/kvikio/kvikio/_lib/defaults.pyx only exposes get/set for thread_pool_nthreads.
Add a thin C++ wrapper and a .pyx binding.
Why it matters: today the only signal is kvikio.Summary, a post-hoc aggregate over the whole query. It can't tell apart a saturated pool (raising thread count would help) from a pool with spare capacity (raising thread count won't help, the real constraint is upstream). A kvikio_nthreads sweep that shows no improvement is ambiguous between those two cases without a live queued/running count. This is also how we'd tell whether max_concurrent_io_tasks or kvikio_nthreads is actually the one binding for a given regression, instead of guessing which layer to tune.
kvikio's thread pool is
BS::thread_pool(cpp/include/kvikio/threadpool_wrapper.hpp), which already implementsget_tasks_queued(),get_tasks_running(), andget_tasks_total(). Real-time utilization for the exact resourcekvikio_nthreads(default 256) controls. None of it is exposed pastkvikio::defaults::thread_pool()(cpp/include/kvikio/defaults.hpp). No C++ wrapper, no Python binding.python/kvikio/kvikio/_lib/defaults.pyxonly exposes get/set forthread_pool_nthreads.Add a thin C++ wrapper and a
.pyxbinding.Why it matters: today the only signal is
kvikio.Summary, a post-hoc aggregate over the whole query. It can't tell apart a saturated pool (raising thread count would help) from a pool with spare capacity (raising thread count won't help, the real constraint is upstream). Akvikio_nthreadssweep that shows no improvement is ambiguous between those two cases without a live queued/running count. This is also how we'd tell whethermax_concurrent_io_tasksorkvikio_nthreadsis actually the one binding for a given regression, instead of guessing which layer to tune.