自造轮子-一个http并发测试工具(http-little-toy)

自造轮子-一个http并发测试工具(http-little-toy)

一个简单的 http 并发测试工具。

介绍

灵感来源于 github 上各种版本的 wrk http并发测试工具,有一天看了一个go写的版本,就这?我也能行。于是自己也造一个轮子。

造轮子真好玩啊。就叫它小玩具吧。

仓库地址

github

gitee

酷友们帮star 一下,后期我会继续维护下去的!

使用

一般使用 -d 控制请求时间(秒),-t 控制线程数(当做用户数量来理解)就可以了。推荐使用request.json文件。

$ go run . -h
Usage: httpToy <options>
Options:
        -H 
                 The http header. --default=[].
        -allowRedirects 
                 allowRedirects --default=true.
        -body 
                 The http body --default="".
        -caCert 
                 caCert --default="".
        -clientCert 
                 clientCert --default="".
        -clientKey 
                 clientKey --default="".
        -compression 
                 Use keep-alive for http protocol. --default=true.
        -d 
                 Duration of request.The unit is seconds. --default=0.
        -f 
                 specify the request definition file. --default="".
        -gen 
                 generate the request definition file template to the current directory. --default=false.
        -h 
                 show help tips --default=false.
        -keepAlive 
                 Use keep-alive for http protocol. --default=true.
        -skipVerify 
                 TLS skipVerify --default=false.
        -t 
                 Number of threads. --default=0.
        -timeOut 
                 the time out to wait response --default=1000.
        -u 
                 The URL you want to test --default="".
        -useHttp2 
                 useHttp2 --default=false.
        -v 
                 show app version. --default=false.
本作品采用《CC 协议》,转载必须注明作者和本文链接
tangq
tangq
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!