背景:
参考专题,压测业务需求分析,本章节主要是压测框架选型对比。
需要在 下面两种选择中,做出抉择:
master slave
locust locust
locust boomer
语言:goland
对着hello code 撸了三天goland ,觉得可以写写基本点代码,开始使用boomer与本身locust做对比压测统计
压测业务:
DNS 解析 ,因为都在本机,http会有比较大的IO且不想在本地开个http service,然后可以从dns解析压测,普及下locust 压测除http之外的协议。
一:locust扩展支持其它协议压测
参考文章 https://www.jianshu.com/p/1d31771f9bcd
二:locust与boomer对非HTTP协议简单压测
参考文章 https://www.jianshu.com/p/cddbfc7e4979
三:locust与boomer压测工具对比
因为 goland本地运行dns解析到时候响应时间快于python socket方式,所以在休眠时间上设置上有微小差异,goland 200ms,python 195ms;本质是想要两种dns解析方式时间稍微更接近一点

goland goczmq 方式




goland gomq 方式
xiaobindeMacBook-Pro:go_hello xiaobin$ ./b.out
2020/01/08 15:18:39 Boomer is built with gomq support.
2020/01/08 15:18:39 Boomer is connected to master(tcp://127.0.0.1:5557) press Ctrl+c to quit.




locust 方式



基本结论:
1.locust 官方说的goczmq支持会更好,在1000+左右QPS场景表现无基本差异;
2.在机器CPU使用差不多负载情况下,boomer构造压力大大优于基于locust本身。
其它情况说明:
因为本身locust是协程方式,本机4核情况下,都启用了三更slave节点,相对对locust更公平些;单slave没有尝试了,可以乐观估计是碾压。
网友评论