当前位置: 首页 > 工具软件 > wrk > 使用案例 >

MAC 安装 wrk

周龙光
2023-12-01

用 Homebrew 安装失败了:

➜  develope brew install wrk
==> Downloading https://homebrew.bintray.com/bottles/wrk-4.1.0.mojave.bottle.2.t
#=#=-#  #                                                                     
curl: (22) The requested URL returned error: 403 Forbidden
Error: Failed to download resource "wrk"
Download failed: https://homebrew.bintray.com/bottles/wrk-4.1.0.mojave.bottle.2.tar.gz

换一种方式:

➜  develope git clone https://github.com/wg/wrk.git 
正克隆到 'wrk'...
remote: Enumerating objects: 1103, done.
remote: Total 1103 (delta 0), reused 0 (delta 0), pack-reused 1103
接收对象中: 100% (1103/1103), 37.84 MiB | 4.51 MiB/s, 完成.
处理 delta 中: 100% (343/343), 完成.
➜  develope 
➜  develope ls
README.md       elasticsearch   java7           maven           redis
ab              gradle          java8           openJdk         virtualMachines
bin             idea_tomcat     jetty           openjdk12       wrk
eclipse         java11          jmeter          python          zkClient
➜  develope cd wrk 
➜  wrk git:(master) make
....
➜  wrk git:(master) wrk   
Usage: wrk <options> <url>                            
  Options:                                            
    -c, --connections <N>  Connections to keep open   
    -d, --duration    <T>  Duration of test           
    -t, --threads     <N>  Number of threads to use   
                                                      
    -s, --script      <S>  Load Lua script file       
    -H, --header      <H>  Add header to request      
        --latency          Print latency statistics   
        --timeout     <T>  Socket/request timeout     
    -v, --version          Print version details      
                                                      
  Numeric arguments may include a SI unit (1k, 1M, 1G)
  Time arguments may include a time unit (2s, 2m, 2h)

可以发现 wrk 已经可以正常使用了。

 类似资料: