colstore.calibrate

colstore.calibrate(*, persist=True, verbose=False, rounds=10)[source]

Measure and select a near-optimal gather thread cap for this machine.

Sweeps a range of thread counts on a synthetic scatter – every candidate timed once per round, interleaved, with the median over rounds rounds as the statistic (see _CALIB_ROUNDS) – picks the smallest count within _KNEE_TOLERANCE of the best throughput, applies it via colstore.config.set_gather_thread_cap(), and (by default) caches it. A half-vs-half pick disagreement emits a stability warning.

Requires the compiled C++ extension; raises RuntimeError if it is unavailable. Returns the chosen cap.

Parameters:
Return type:

int