stress.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:ave 作者: sonyxperiadev 项目源码 文件源码
def client_03(port, prefix):
    c = RemoteControl(('',port), None, timeout=10)
    while True:
        if random.random() > 0.7:
            c = RemoteControl(('',port), None, timeout=10)
        try:
            c.raise_ave_exception({'message':'hello', 'recognize':'me'})
        except Exit:
            os._exit(0)
        except AveException, e:
            if 'recognize' in e.details:
                continue
            print('client PID=%d got exception: %s' % (os.getpid(), e))
            os._exit(2)
        except Exception, e:
            print('client PID=%d got exception: %s' % (os.getpid(), e))
            os._exit(1)

# load test for control. send hickup if the control freezes up
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号