Core SignalR 壓力測試說明

  • 179
  • 0
  • 2020-11-09

Core SignalR 壓力測試說明

https://github.com/Azure/azure-signalr-bench

先安裝 
dotnet tool install --global Microsoft.dotnet-signalr-benchmark --version 1.0.56301

開三個CMD 分別執行
dotnet signalr-bench agent

dotnet signalr-bench application

dotnet signalr-bench controller -c echo.yaml

echo.yaml 的內容

​mode: simple
config:
  webAppTarget: http://localhost:5050/signalrbench
  connections: 1000
  baseSending: 500
  step: 500
  singleStepDuration: 1000
  debug: true

最後會得到
 

[11:45:04 INF] Open channel to rpc server...
[11:45:04 INF] Create Rpc client...
......
[11:54:38 INF] Stop collecting...
[11:54:38 INF] -----------
[11:54:38 INF]   1000 connections established in 9s
[11:54:38 INF] -----------
[11:54:38 INF]  Connections/sendingStep: 1000/500 in 5s
[11:54:38 INF]  Messages: requests: 1.81MB, responses: 1.81MB
[11:54:38 INF]    Requests/sec: 175.80
[11:54:38 INF]    Responses/sec: 175.80
[11:54:38 INF]    Write throughput: 361.44KB
[11:54:38 INF]    Read throughput: 361.44KB
[11:54:38 INF]  Latency:
[11:54:38 INF]   50.00%: < 100 ms
[11:54:38 INF]   90.00%: < 100 ms
[11:54:38 INF]   95.00%: < 100 ms
[11:54:38 INF]   99.00%: < 200 ms
[11:54:38 INF] -----------
[11:54:38 INF]  Connections/sendingStep: 1000/1000 in 4s
[11:54:38 INF]  Messages: requests: 3.67MB, responses: 3.67MB
[11:54:38 INF]    Requests/sec: 446.00
[11:54:38 INF]    Responses/sec: 446.00
[11:54:38 INF]    Write throughput: 916.98KB
[11:54:38 INF]    Read throughput: 916.98KB
[11:54:38 INF]  Latency:
[11:54:38 INF]   50.00%: < 100 ms
[11:54:38 INF]   90.00%: < 100 ms
[11:54:38 INF]   95.00%: < 100 ms
[11:54:38 INF]   99.00%: < 100 ms
[11:54:38 INF] Handle step...

還有另一個 還沒研究
https://github.com/dotnet/aspnetcore/tree/master/src/SignalR/perf/benchmarkapps/Crankier

如果內容有誤請多鞭策謝謝