hey, HTTP负载生成器,ApacheBench ( ab ) 替换,以前称为 rakyll/boom

分享于 

3分钟阅读

GitHub

  繁體 雙語
HTTP load generator, ApacheBench (ab) replacement, formerly known as rakyll/boom
  • 源代码名称:hey
  • 源代码网址:http://www.github.com/rakyll/hey
  • hey源代码文档
  • hey源代码下载
  • Git URL:
    git://www.github.com/rakyll/hey.git
    Git Clone代码到本地:
    git clone http://www.github.com/rakyll/hey
    Subversion代码到本地:
    $ svn co --depth empty http://www.github.com/rakyll/hey
    Checked out revision 1.
    $ cd repo
    $ svn up trunk
    

    hey

    Build Status

    嘿,是一个小程序,向web应用程序发送一些负载。

    最初被称为 boom,受到Tarek工具的影响,在 tarekziade/boom。 使用相同的名称是一个错误,因为这导致了二进制名称冲突产生混淆的情况。 为了保留它的原始所有者的名称,我们将这个项目重命名为。

    安装

    
    go get -u github.com/rakyll/hey
    
    
    
    

    用法

    hey运行提供的并发级别中的请求数并打印统计信息。

    它还支持HTTP2端点。

    
    Usage: hey [options...] <url>
    
    
    
    Options:
    
    
     -n Number of requests to run. Default is 200.
    
    
     -c Number of requests to run concurrently. Total number of requests cannot
    
    
     be smaller than the concurrency level. Default is 50.
    
    
     -q Rate limit, in queries per second (QPS). Default is no rate limit.
    
    
     -z Duration of application to send requests. When duration is reached,
    
    
     application stops and exits. If duration is specified, n is ignored.
    
    
     Examples: -z 10s -z 3m.
    
    
     -o Output type. If none provided, a summary is printed.
    
    
    "csv" is the only supported alternative. Dumps the response
    
    
     metrics in comma-separated values format.
    
    
    
     -m HTTP method, one of GET, POST, PUT, DELETE, HEAD, OPTIONS.
    
    
     -H Custom HTTP header. You can specify as many as needed by repeating the flag.
    
    
     For example, -H"Accept: text/html" -H"Content-Type: application/xml". 
    
    
     -t Timeout for each request in seconds. Default is 20, use 0 for infinite.
    
    
     -A HTTP Accept header.
    
    
     -d HTTP request body.
    
    
     -D HTTP request body from file. For example,/home/user/file.txt or./file.txt.
    
    
     -T Content-type, defaults to"text/html".
    
    
     -a Basic authentication, username:password.
    
    
     -x HTTP Proxy address as host:port.
    
    
     -h2 Enable HTTP/2.
    
    
    
     -host HTTP Host header.
    
    
    
     -disable-compression Disable compression.
    
    
     -disable-keepalive Disable keep-alive, prevents re-use of TCP
    
    
     connections between different HTTP requests.
    
    
     -disable-redirects Disable following of HTTP redirects
    
    
     -cpus Number of used cpu cores.
    
    
     (default for current machine is 8 cores)
    
    
    
    

    以前称为 github.com/rakyll/boom

    注:需要 go 1.7或者更高版本。


    rep  HTTP  Generator  repl  Apache  替换  
    相关文章