The Go Programming Language
› http://golang.org/
› Go Playground
Go Projects
› Revel Web Framework
Nazz

为了压测 websocket server 性能, 我写了一个命令行工具和生成图表脚本

  •  
  •   Nazz · Aug 24, 2023 · 2292 views
    This topic created in 1168 days ago, the information mentioned may be changed or developed.

    仓库地址

    语言环境

    • go
    • nodejs

    安装依赖

    go install github.com/lxzan/wsbench@latest
    npm i pm2 -g
    

    开始测试

    运行 5 轮测试, 最后取中位数

    make build
    pm2 start ./bin/*
    cd frontend
    npm install
    pm2 start index.js --watch
    sh bench.sh
    

    测试程序退出后, 访问 http://localhost:8080

    result

    2 replies  •  2023-08-24 12:27:03 +08:00
    Nazz
    Nazz
    OP
    Aug 24, 2023
    1
    补充说明下, gorilla/websocket 和 nhooyr/websocket 未使用 stream api
    mrochcnnnnn
    mrochcnnnnn
    Aug 24, 2023
    2
    赞
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1755 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 17:19 · PVG 01:19 · LAX 09:19 · JFK 12:19
    ♥ Do have faith in what you're doing.