Baton HTTP 负载测试工具开源项目

我要开发同款
匿名用户2021年10月27日
171阅读

技术信息

开源地址
https://github.com/americanexpress/baton
授权协议
Apache 2.0

作品详情

Bato是一个用Go编写的HTTP 负载测试工具,目前支持GET、POST、PUT和DELETE请求。

安装$goget-ugithub.com/americaexpress/bato使用

目前支持以下选项

-bstrigBody(useisteadof-f)-citNumberofcocurretrequests(default1)-fstrigFilepathtofiletobeusedasthebody(useisteadof-b)-iIgoreTLS/SSLcertificatevalidatio-mstrigHTTPMethod(GET,POST,PUT,DELETE)(default"GET")-oSupressoutput,oresultswillbepritedtostdout-ritNumberofrequests(useisteadof-t)(default1)-titDuratiooftestigisecods(useisteadof-r)-ustrigURLtoruagaist-witNumberofsecodstowaitbeforeruigtest-zstrigReadrequestsfromafile

下面是使用10个终端发送200,000个请求的基本示例:

 

$bato-uhttps://localhost:8080/test-c10-r200000

可以指定发送请求的时间(以秒为单位),而不是请求的数量,Bato会等收到所有响应之后才报告结果。

请求文件

如果从-zfileame指定加载请求的文件,文件必须为CSV格式。

<method>,<url>,[<body>],[<header-key>:<header-value>,...]...

可以在末尾有一个或多个标题,用 , 隔开,比如:

POST,https://localhost:8888,body,Accept:applicatio/xml,Cotet-type:SecretGET,https://localhost:8888,,,输出示例======================Results======================Totalrequests:1254155Timetaketocompleterequests:10.046739294sRequestspersecod:124832Maxresposetime(ms):440Miresposetime(ms):55Avgresposetime(ms):156.70=====================Breakdow=====================Numberofcoectioerrors:0Numberof1xxresposes:0Numberof2xxresposes:1254155Numberof3xxresposes:0Numberof4xxresposes:0Numberof5xxresposes:0=====================================================

功能介绍

Baton 是一个用 Go 编写的 HTTP 负载测试工具,目前支持 GET、POST、PUT 和 DELETE 请求。 安装
$ go get -u github.com/american...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论