Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/313.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python负载测试套接字通信_Python_Benchmarking - Fatal编程技术网

Python负载测试套接字通信

Python负载测试套接字通信,python,benchmarking,Python,Benchmarking,我有两个Python脚本server.py和client.py,它们使用套接字连接,服务器看起来就像: while True: try: conn, addr = server.accept() handle(conn, addr) except KeyboardInterrupt: break 所以它一次只处理一个客户机,然后稍后我将添加gevent,这样它就可以并发处理客户机 我如何对其进行基准测试,以确定有vs但没有geve

我有两个Python脚本server.py和client.py,它们使用套接字连接,服务器看起来就像:

while True:
    try:
        conn, addr = server.accept()
        handle(conn, addr)
    except KeyboardInterrupt:
        break
所以它一次只处理一个客户机,然后稍后我将添加gevent,这样它就可以并发处理客户机

我如何对其进行基准测试,以确定有vs但没有gevent的客户端请求/秒


我发现了很多HTTP基准测试工具,但是TCP呢?理想情况下,我希望测试运行我的几个client.py脚本并将其用作测试。

最后编写了我自己的线程基准测试