lxzan / wsbench Goto Github PK
View Code? Open in Web Editor NEWwebsocket benchmark tool
License: MIT License
websocket benchmark tool
License: MIT License
现在的echo模式压测,相同参数下,每次测试的结果,浮动比较大。
具体请看下面的数据:
4:07PM INF Duration=8.9868487s IOPS=11127 P50=2605ms P90=4930ms P99=6451ms
4:07PM INF Duration=9.5169201s IOPS=10507 P50=2020ms P90=3753ms P99=5262ms
4:07PM INF Duration=9.2686362s IOPS=10789 P50=2769ms P90=5058ms P99=6613ms
4:10PM INF Duration=9.0430895s IOPS=11058 P50=2310ms P90=3342ms P99=4190ms
这种情况下,我尝试过调整参数,我想得到一个:连接数量、消息数量都比较大,但是P99又比较理想的IOPS值。
这种IOPS值比较有参考价值。但是目前的压测逻辑做不到,当然不排除我使用姿势不对的可能。
我建议改动一下压测逻辑:
我按上面的逻辑改了一版后,相同的消息总量下,压测数据如下:
3:51PM INF Duration=11.076374s IOPS=9030 P50=132ms P90=379ms P99=520ms
3:51PM INF Duration=10.7231663s IOPS=9325 P50=135ms P90=334ms P99=551ms
3:51PM INF Duration=10.7231663s IOPS=9325 P50=135ms P90=334ms P99=551ms
4:04PM INF Duration=11.2103891s IOPS=8920 P50=120ms P90=432ms P99=628ms
多数实际场景中单个连接的数据交互没有那么多,像tcpkali那种一边按照固定频率不停发的方式,如果设置的频率过大就被server限流close了,不符合实际场景。
计算单位cpu、mem消耗对应的吞吐,相当于能效比
海量连接数需要多端口,如果测试client配置低不适合每个连接一个协程
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.