美文网首页
跨Shard丢失率测试报告

跨Shard丢失率测试报告

作者: 6g3y | 来源:发表于2021-05-02 22:18 被阅读0次

路径: 跨越24次星门,穿越 16次星门最后回到s3

From  shard3_W20N10 to shard3_E30N40
{
  path: [
    { shard: 'shard3', roomName: 'W20N10', x: 40, y: 16 },
    { shard: 'shard2', roomName: 'W20N10', x: 39, y: 33 },
    { shard: 'shard1', roomName: 'W20N10', x: 41, y: 9 },
    { shard: 'shard0', roomName: 'W29N10', x: 1, y: 19 },
    { shard: 'shard0', roomName: 'W30N30', x: 43, y: 43 },
    { shard: 'shard1', roomName: 'W20N20', x: 38, y: 12 },
    { shard: 'shard0', roomName: 'W30N39', x: 40, y: 1 },
    { shard: 'shard0', roomName: 'W19N40', x: 1, y: 6 },
    { shard: 'shard0', roomName: 'W20N50', x: 43, y: 29 },
    { shard: 'shard1', roomName: 'W10N30', x: 10, y: 13 },
    { shard: 'shard0', roomName: 'W19N60', x: 1, y: 4 },
    { shard: 'shard0', roomName: 'W20N70', x: 39, y: 38 },
    { shard: 'shard1', roomName: 'W10N40', x: 8, y: 25 },
    { shard: 'shard0', roomName: 'W20N79', x: 35, y: 1 },
    { shard: 'shard0', roomName: 'E10N80', x: 36, y: 18 },
    { shard: 'shard1', roomName: 'E10N40', x: 33, y: 6 },
    { shard: 'shard0', roomName: 'E20N82', x: 29, y: 48 },
    { shard: 'shard0', roomName: 'E70N80', x: 33, y: 8 },
    { shard: 'shard1', roomName: 'E40N40', x: 40, y: 19 },
    { shard: 'shard0', roomName: 'E80N69', x: 5, y: 1 },
    { shard: 'shard0', roomName: 'E40N71', x: 28, y: 48 },
    { shard: 'shard0', roomName: 'E50N70', x: 14, y: 38 },
    { shard: 'shard1', roomName: 'E30N40', x: 8, y: 33 },
    { shard: 'shard2', roomName: 'E30N40', x: 13, y: 29 }
  ],
  distance: 681,
  totalRooms: 40
}

体型 配置: [ MOVE ]

测试只数 :500只
出兵速度:30tick出一次(如果spawn被占用则不生)
路上被杀了 1 只(没能走到最后的) ,房间在:s2的 [E30N40] 相当于index 23

cpu分配情况:s0,s1不分配,s2,s3cpu充足

结果:

s0
index3:490
index4:490
index6:484
index7:484
index8:484
index10:480
index11:480
index13:472
index14:472
index16:464
index17:464
index19:457
index20:457
index21:457

s1
index2:492
index5:486
index9:480
index12:476
index15:470
index18:459
index22:454

s2
index1:494
index23:451

s3
index0:500
index24:448 

观察可得出:在跨shard的时候有概率出现丢失的现象,是同shard的不丢creep
具体数据如下:

index1:494
index2:492
index3:490
index5:486
index6:484
index9:480
index10:480
index12:476
index13:472
index15:470
index16:464
index18:459
index19:457
index22:454
index23:451
index24:448(最后应该为 449 ,死掉的那只)

得出跨16次shard大约丢了 10% 的creep,
假设每次不丢creep的概率为 P
有 Math.pow(P,16) = 0.9
P 约为 0.993
所以跨一次 shard 丢爬的概率为 1 - 0.993 = 0.007= 0.7%

这里仅仅是估算,具体得看实际服务器的波动情况

相关文章

网友评论

      本文标题:跨Shard丢失率测试报告

      本文链接:https://www.haomeiwen.com/subject/gfrxdltx.html