Closed Cai-Yao closed 1 year ago
你这测试方法不对呀,你用100多个线程去测试,线程切换的开销会很大,不是已经有一个benchamrk client的例子了吗? https://github.com/qicosmos/rest_rpc/blob/master/examples/client/main.cpp#L616 用client的异步call,启动这样的几个client就够了。
同步client call用起来方便,但是效率没有client call效率高,不过平时开发的时候同步call一般情况下性能也够用,性能测试下用异步call可以让client请求的效率很高,性能测试数据才会比较准确。
嗯好,我使用benchamrk client的例子试试
client
server
result
请问这是什么原因,是因为哪里的细节没有注意到吗