压测工具 ab jmeter
apach ab|abs
ab -n -c xxx.html/js/css
jmeter
windows/linux 配置bin目录到PATH环境变量
jmeter -JTOKEN=Nzcwxxxx-ae0e10f -JUSER=cuham -JTHREADS=1 -JLOOP=1 -t "xxx.jmx" -n -l xxxx.jtl
-n 非GUI模式
-l 指定生成的log文件名 一般格式为jtl文件
有一些插件可以把jtl转成html报表
jtl example:
1647830394996,2668,GatewayTests - planExists,200,,Thread Group 1-1,text,true,,4616,364,1,1,http://localhost:8089/2022-07-31&planExists=y,2667,0,0
1647830397665,1923,GatewayTests - devices-not-set,200,,Thread Group 1-1,text,true,,504,367,1,1,http://localhost:8089/2022-07-31&assessment=No+Set,1921,0,0
1647830399589,2164,GatewayTests - assessment - multiple,200,,Thread Group 1-1,text,true,,2395,390,1,1,http://localhost:8089/NoRisk&aessment=No+Set,2164,0,0
jmeter -g xxxx.jtl -o result_report_dir
siege
用途:测试分布式锁是否有效, 测试java Lock是否使用正确,测试接口吞吐量
性能测试报告
使用jmeter跑出的结果 导入到excel中, 然后可以做一些饼图 柱状图,方便对比查阅
@@@build beautiful things, share happiness@@@