File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -445,6 +445,8 @@ def _run_timing_subprocess( # noqa: PLR0913
445445 For ``"chardet"`` only -- ``"all"``, ``"modern_web"``, or ``"none"``.
446446 pure : bool
447447 Abort if mypyc .so/.pyd files are found (chardet only).
448+ threads : int
449+ Number of detection threads to pass to ``benchmark_time.py``.
448450
449451 Returns
450452 -------
@@ -699,6 +701,8 @@ def run_comparison( # noqa: PLR0913
699701 Hash of benchmark source files for cache invalidation.
700702 no_memory : bool
701703 Skip memory benchmarks when ``True``.
704+ threads : int
705+ Number of detection threads to pass to ``benchmark_time.py``.
702706
703707 """
704708 if detector_versions is None :
@@ -1251,6 +1255,8 @@ def _run_timing_for_detector(
12511255
12521256 if args .pure and args .mypyc :
12531257 parser .error ("--pure and --mypyc are mutually exclusive" )
1258+ if args .threads < 1 :
1259+ parser .error ("--threads must be >= 1" )
12541260
12551261 # Force line-buffered stdout so progress is visible when piped (e.g. tee).
12561262 sys .stdout .reconfigure (line_buffering = True )
You can’t perform that action at this time.
0 commit comments