gosiege:GOSIEGE,GO制造的httphttps压力测试仪

  • s3_713641
    了解作者
  • 27KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-27 13:53
    上传日期
GOSIEGE,GO制造的http / https压力测试仪 受《启发,我试图做类似的事情。 我添加了一些有用的功能,例如: 过滤器响应标头 在请求中发送自定义标头 在POST请求中发送自定义参数 安装 go get -u github.com/tux-eithel/gosiege/ 命令行 -c x Where x is the number of concurrent connections. Default 1 -exp "HeaderField Value" Filters header using regular expression. You can define multiple regexp. HeaderField is a header field, Value must be a regular expression. Examples are:
gosiege-master.zip
内容介绍
# GOSIEGE, http/https stress tester made in GO *** Inspired by [Siege](http://www.joedog.org/siege-home/) I have tried to do something similar. I have added some useful features like: * filter response header * send custom header in request * send custom param in POST request ### Install ``` go get -u github.com/tux-eithel/gosiege/ ``` ### Command Line ``` -c x Where x is the number of concurrent connections. Default 1 -exp "HeaderField Value" Filters header using regular expression. You can define multiple regexp. HeaderField is a header field, Value must be a regular expression. Examples are: `-exp "X-Cache HIT"` `-exp "X-Cache .*"` -f fileName File which contains at least an url for every row -nasty=boolValue Uses all available CPUs, physic and logic. Default true -per y Test every url y times. When all url are been tested y time, gosiege quits. Default -1, so test will run until you press Ctrl+c -pexp Prints the header which matches HeaderField. If a header matches, it will print in green color, otherwise magenta is used -rand=boolValue Takes random url from the list. Default is true. False may be useful if you want to test the list sequentially -s Times to wait between each requests. Values accepted according http://golang.org/pkg/time/#Duration. Default is 1s -u List of urls (space separated) passed via CLI. It can be used along -f option ``` ### Examples Reads input file and pass some url via CLI. Starts 5 concurrent connection and hit every url 2 times then quits * `gosiege -f test -u "google.com https://duckduckgo.com/" -c 5 -per 2` Reads urls from CLI and runs 40 concurrent connections. Between calls 30ms will be waited * `gosiege -u "google.com https://duckduckgo.com/" -c 40 -s 30ms` Reads urls from CLI, checks if in header is present "Server" header and prints the result * `gosiege -u "google.com https://duckduckgo.com/about" -c 2 -exp "Server gws" -pexp` ### Output Commnad: `gosiege -u "google.com https://duckduckgo.com/about" -c 2 -exp "Server gws" -pexp` ``` . . . 200 0.20s 46.09KB /about Server: 'nginx' <-- this is printed because -pexp 200 0.29s 17.55KB / Server: 'gws' <-- this is printed because -pexp . . . Received quit. Sending shutdown and waiting all goroutines... . . . Transactions: 10 hits Availability: 100.00% Elapsed time: 7.106084685s Transaction rate: 1.41 Successful transactions: 10 Failed transactions: 0 Response time: 0.37s Longest transaction: 0.75s Shortest transaction: 0.12s Throughput: 44.78KB Average bytes for transaction: 31.82KB Header Server: 'gws' Transactions with this header: 10 Was present in 100.0% of total transactions Match the regexp 50.0% transactions Done. ``` ### Statistics * Transactions: number of server hits * Availability: percentage connections successfully handled by the server. It's not included 40x and 50x errors * Elapsed time: duration of entire test * Transaction rate: transactions / elapsed time * Successful transactions: hits with code < 400 * Failed transactions: hits with code >=400 (not included socket errors or timeouts) * Response time: average time to respond to each requests * Longest transaction: the slowest hit * Shortest transaction: the quickest hit * Throughput: average number of bytes transferred every second * Average bytes for transaction: average number of bytes transferred for request If some regular expression is defined using `-exp`, for every regular expression: * name of *HeaderField* and *Value* of regular expression * number of transaction where *HeaderField* is present * percentage of connections with *HeaderField* present on total transactions * percentage of connections which matches the regular expression over transactions where *HeaderField* was present ### Input File Input file can contains different urls. Every url may have some parameters. If an url doesn't match one of the below examples, it will be skipped. Parameters are space separated. #### Valid urls are: Simple GET request: automatically gosiege add http:// * `example.com` GET request with some header. Header must be a valid json object (simple, only string) * `http://example.com {"Cache-Control":"max-age=0"}` Simple POST request: * `www.example.com POST` POST request with some header. Header must be a valid json object (simple, only string) * `www.example.com POST {"Cache-Control":"max-age=0"}` POST request with header and parameters * `www.example.com POST {"Content-Type":"application/x-www-form-urlencoded"} id=2&user=100` POST request with only parameters * `www.example.com POST {} id=2&user=100` ### Tips * Ctrl+c for exit * You can use -f and -u together * Passing urls like *example.com*, gosiege adds http:// in the front and makes a GET request ### Bugs Yeah there are bugs... help me fix them :) !
评论
    相关推荐
    • terumet:开源体素游戏 Minetest (https) 的模组
      这个模组在世界上创造了一种新的矿石,可以用来从许多现有的材料中制造有用的合金。 变更日志 在查看变更日志 安装 单击上面绿色的“克隆或下载”按钮,获取最新的正在进行中的 mod 版本的 ZIP 文件。 如果要使用较...
    • example-project:https
      电动自行车是虚拟的电动自行车制造商。 该应用程序可通过丰富的用户体验帮助电动自行车管理其产品和经销商订单。 该示例应用程序旨在在Salesforce平台上运行。 如果您想在任何平台上体验Lightning Web Components...
    • discord-bot:Star Citizen Discord Bot使用来自https的数据
      调用不带参数的命令将输出所有可用制造商的列表。 命令sc_manufacturer 通讯卡 命令sc_comm-links 频道通知 此外,如果发布了新的通讯链接,您可以通过一个渠道接收通知。 sc_comm-links add >添加当前频道以接收...
    • 锅炉制造商:项目代码支架
      锅炉制造商 好事成双成对 想要混合使用express / sequelize的后端和使用react / redux的前端? 那是boilermaker ! 跟着样板车间一起做自己的! 此规范版本可以用作参考或起点。 有关构成此存储库的代码的深入讨论...
    • 山寨手机制造大揭密
      NULL 博文链接:https://skyline888.iteye.com/blog/883883
    • 制造视图.txt
      NULL 博文链接:https://cddcdd.iteye.com/blog/318377
    • dealer:https
      例子:我将输入汽车的型号,制造商,版本,发布年份,价格,油耗和年度维护成本。汽车将显示在功能1返回的结果中。 :green_book:功能3 作为汽车经销商,我想向我的客户推荐在四(4)年内年总成本最低的汽车。 :...
    • 爆炸制造者:移至https:github.comwonismanimoji-maker
      爆炸制造者:移至https:github.comwonismanimoji-maker
    • Specoresto:React制造的无麸质素食餐厅定位器。 位于https://bernardmurphy.netspecor
      斯佩雷斯托 Specoresto是一款可以转到您所在位置(如果您允许的话)的应用程序,它可以在附近找到适合特殊饮食需求的人的餐馆。 到目前为止,有两种选择:无麸质和素食主义者。 可以根据要求添加更多。...
    • GaussDB_100_1.0.1-DATABASE-REDHAT-64bit.tar.gz
      guassdb100在redhat上安装包,单机部署的包,安装步骤请看我的文中介绍,经过大量实验搭建总结出来的文档