测试
性能测试
安装命令行工具
安装命令行工具: 链接
发送消息吞吐量测试
所有测试都包含消息存储操作
测试发送消息吞吐量 (一个连接发送 10 万条消息)
wk bench ch001 --pub 1 --msgs 100000
2023/06/25 19:59:39 Get the tcp address of a test user
2023/06/25 19:59:39 Starting WuKongIM pub/sub benchmark [msgSize=128 B]
2023/06/25 19:59:39 Starting pub, sending 100,000 messages
Finished 0s [=============================================================================================================================] 100%
Pub stats: 194,719 msgs/sec ~ 23.77 MB/sec
测试发送消息吞吐量 (10 个连接发送 10 万条消息)
wk bench ch001 --pub 10 --msgs 100000
2023/06/25 20:00:06 Get the tcp address of a test user
2023/06/25 20:00:06 Starting WuKongIM pub/sub benchmark [msgSize=128 B]
2023/06/25 20:00:06 Starting pub, sending 10,000 messages
2023/06/25 20:00:06 Starting pub, sending 10,000 messages
2023/06/25 20:00:06 Starting pub, sending 10,000 messages
2023/06/25 20:00:06 Starting pub, sending 10,000 messages
2023/06/25 20:00:06 Starting pub, sending 10,000 messages
2023/06/25 20:00:06 Starting pub, sending 10,000 messages
2023/06/25 20:00:06 Starting pub, sending 10,000 messages
2023/06/25 20:00:06 Starting pub, sending 10,000 messages
2023/06/25 20:00:06 Starting pub, sending 10,000 messages
2023/06/25 20:00:06 Starting pub, sending 10,000 messages
Finished 0s [=============================================================================================================================] 100%
Finished 0s [=============================================================================================================================] 100%
Finished 0s [=============================================================================================================================] 100%
Finished 0s [=============================================================================================================================] 100%
Finished 0s [=============================================================================================================================] 100%
Finished 0s [=============================================================================================================================] 100%
Finished 0s [=============================================================================================================================] 100%
Finished 0s [=============================================================================================================================] 100%
Finished 0s [=============================================================================================================================] 100%
Finished 0s [=============================================================================================================================] 100%
Pub stats: 249,158 msgs/sec ~ 30.41 MB/sec
[1] 26,799 msgs/sec ~ 3.27 MB/sec (10000 msgs)
[2] 25,894 msgs/sec ~ 3.16 MB/sec (10000 msgs)
[3] 25,658 msgs/sec ~ 3.13 MB/sec (10000 msgs)
[4] 25,641 msgs/sec ~ 3.13 MB/sec (10000 msgs)
[5] 25,357 msgs/sec ~ 3.10 MB/sec (10000 msgs)
[6] 25,196 msgs/sec ~ 3.08 MB/sec (10000 msgs)
[7] 25,182 msgs/sec ~ 3.07 MB/sec (10000 msgs)
[8] 25,099 msgs/sec ~ 3.06 MB/sec (10000 msgs)
[9] 25,018 msgs/sec ~ 3.05 MB/sec (10000 msgs)
[10] 24,935 msgs/sec ~ 3.04 MB/sec (10000 msgs)
min 24,935 | avg 25,477 | max 26,799 | stddev 529 msgs