Auto Threading
abstract
Auto thread intelligently prevents your browser from launching if CPU usage exceeds a configurable threshold value. It allows to launch browser only if enough CPU is available. This ensures stability for your script execution.
Auto thread feature checks the CPU usage of the machine before launching each browser instance and allows it to launch only if enough CPU is available.
Auto thread helps in adjusting the thread number as per your machine capacity.
Provide your thread number as 0 so that maximum thread launched will be equal to the capacity provided in browser_types
infoIf auto thread is enabled, the maximum number of browser opens is equal to the count specified as Thread number to the suite.
Configure
Below are the 2 properties related to auto thread-
sahi.auto_thread.enabled
Enabling it provides you the auto thread experience -
sahi.threshold.cpu_usage
Specify the threshold CPU usage below which browser can be launched. Default is 90