Checking network input processing by Python for a multi-threaded server

Markus Elfring Markus.Elfring at web.de
Wed May 1 09:25:44 EDT 2019


> https://docs.python.org/3/library/socketserver.html#asynchronous-mixins

I have constructed a pair of small scripts for another test.
A command (which refers to the second Python script) is executed 100 times
by “subprocess.run()” with parameters so that the child process can send six
test records back to the caller over a TCP connection.

1. The received records are appended to a global list variable during
   each loop iteration.

2. The list length is appended to another global list variable.

3. The stored list lengths are counted by grouping of this information.

   Now I wonder again about a test result like the following for
   the software “Python 3.7.2-3.1” (for an openSUSE system).


elfring at Sonne:~/Projekte/Python> time /usr/bin/python3 test-statistic-server1.py
incidence|"available records"|"return code"|"command output"
44|6|0|
12|5|0|
13|4|0|
16|3|0|
2|7|0|
8|2|0|
3|8|0|
1|1|0|
1|9|0|

real	0m29,123s
user	0m5,925s
sys	0m1,073s


Does this data processing approach indicate a need for further software corrections?

Regards,
Markus


More information about the Python-list mailing list