压测工具 SuperBenchmarker
压测工具 SuperBenchmarker

压测工具 SuperBenchmarker

  • 安装chocolatey环境(类似npm)
管理员权限打开powershell,运行如下命令

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
  • SuperBenchmarker安装
cinst SuperBenchmarker
  • SuperBenchmarker用法
sb -m POST -u http://xxxxxxxxx/api/v1/xxxxxx -t post_data.txt -n 5 -c 1000

-u 网站
-n 指定测试总 Request 数量
-c 指定并发   Request 数量
-m 指定要使用的HTTP Method
-h 指定要显示HTTP Header
-q 指定要显示Cookie