You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 25, 2024. It is now read-only.
Can LAVA re-use TCP connection?
[2022-07-07 02:23:06 +0000] [DEBUG] tf.validation.linaro.org: Retrieving result summary for job: 866847
[2022-07-07 02:23:06 +0000] [DEBUG] Starting new HTTPS connection (1): tf.validation.linaro.org:443
[2022-07-07 02:23:07 +0000] [DEBUG] https://tf.validation.linaro.org:443 "POST //RPC2 HTTP/1.1" 200 197
[2022-07-07 02:23:07 +0000] [DEBUG] tf.validation.linaro.org: requesting results for 0_interactive_uart0_6 with offset of 0
[2022-07-07 02:23:07 +0000] [DEBUG] Starting new HTTPS connection (1): tf.validation.linaro.org:443
[2022-07-07 02:23:08 +0000] [DEBUG] https://tf.validation.linaro.org:443 "POST //RPC2 HTTP/1.1" 200 298
[2022-07-07 02:23:08 +0000] [DEBUG] tf.validation.linaro.org: requesting results for 0_interactive_uart0_5 with offset of 0
[2022-07-07 02:23:08 +0000] [DEBUG] Starting new HTTPS connection (1): tf.validation.linaro.org:443
[2022-07-07 02:23:09 +0000] [DEBUG] https://tf.validation.linaro.org:443 "POST //RPC2 HTTP/1.1" 200 299
[2022-07-07 02:23:09 +0000] [DEBUG] tf.validation.linaro.org: requesting results for 0_interactive_uart0_4 with offset of 0
[2022-07-07 02:23:09 +0000] [DEBUG] Starting new HTTPS connection (1): tf.validation.linaro.org:443
[2022-07-07 02:23:09 +0000] [DEBUG] https://tf.validation.linaro.org:443 "POST //RPC2 HTTP/1.1" 200 299
[2022-07-07 02:23:09 +0000] [DEBUG] tf.validation.linaro.org: requesting results for 0_interactive_uart0_3 with offset of 0
Problem
The interaction above took ~3s to complete, could it be improved by re-using the same connection?
Solution
Use sessions to connect to LAVA using REST API
Keep-Alive: timeout=5, max=100
s = requests.Session()
s.get("https://")
https://requests.readthedocs.io/en/latest/user/advanced/?highlight=keep%20alive#keep-alive
Will probably do the same for squad-client and squad
The text was updated successfully, but these errors were encountered: