fdbus icon indicating copy to clipboard operation
fdbus copied to clipboard

invoke()耗时问题

Open DevelopJoy opened this issue 4 years ago • 1 comments

您好,测试了fdbclienttest和fdbservertest,自定义message,统计invoke时间,统计方式如下: clock_t start, finish; double duration = 0; start = clock(); invoke(ref, builder); /* onInvoke() will be called at server */ finish = clock(); duration = (double)(finish - start) / CLOCKS_PER_SEC; ,测试了三个message,有5%左右的概率会出现某个(三个随机出现)message对应的传输时间为2.5秒左右,其余基本小于2ms。 请问什么原因?

DevelopJoy avatar Aug 04 '20 13:08 DevelopJoy

我在main_xclient.cpp里增加了-y选项用于测试同步调用:

  1. 启动服务:fdbxserver
  2. 启动客户:fdbxclient -y -d 100000 -s 1 最后一列记录的是最大延时。我测试下来没有出现2.5秒的情况,你可以用这个方法测一下,有什么问题再反馈,谢谢!

jeremyczhen avatar Aug 26 '20 02:08 jeremyczhen