websocket-performance-demo:通过WebSocket推送大量数据的演示

上传者: 42098251 | 上传时间: 2022-08-11 13:33:47 | 文件大小: 4.12MB | 文件类型: ZIP
WebSocket性能演示 Websocket可以处理的负载示例。 该代码是非常基本的。 目的是测试非常频繁地将数据推送到Web应用程序并实时更新应用程序的WebSockets的性能。 设想 演示的场景包括和。 通过WebSocket从Web应用程序连接到后端后,后端服务器开始以以下形式推送消息: { " row " : 2 , " column " : 8 , " value " : 20 } 给客户。 前端会限制所有更新,并每100毫秒(可通过TABLE_REFRESH_INTERVAL配置)将其应用到屏幕上。 该应用程序还显示接收到的消息数,并计算每秒和每分钟收到的平均消息数。 结果 浏览器每分钟处理18k条消息,没有任何问题。 用户界面React灵敏。 “性能”选项卡显示几乎没有处理时间。 每个帧中的大部分时间都花在渲染和绘画上(分别为1386ms和630m

文件下载

资源详情

[{"title":"( 27 个子文件 4.12MB ) websocket-performance-demo:通过WebSocket推送大量数据的演示","children":[{"title":"websocket-performance-demo-master","children":[{"title":"frontend","children":[{"title":"jsconfig.json <span style='color:#111;'> 60B </span>","children":null,"spread":false},{"title":"live-table.js <span style='color:#111;'> 1.60KB </span>","children":null,"spread":false},{"title":"index.html <span style='color:#111;'> 653B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 845B </span>","children":null,"spread":false},{"title":"script.js <span style='color:#111;'> 3.03KB </span>","children":null,"spread":false}],"spread":true},{"title":"workspace.code-workspace <span style='color:#111;'> 244B </span>","children":null,"spread":false},{"title":"results","children":[{"title":"perf-tab.png <span style='color:#111;'> 74.25KB </span>","children":null,"spread":false},{"title":"18k-msgs.gif <span style='color:#111;'> 4.05MB </span>","children":null,"spread":false}],"spread":true},{"title":".gitignore <span style='color:#111;'> 2.09KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 2.35KB </span>","children":null,"spread":false},{"title":"backend","children":[{"title":"deno","children":[{"title":"ws_handler.ts <span style='color:#111;'> 2.76KB </span>","children":null,"spread":false},{"title":"main.ts <span style='color:#111;'> 1.62KB </span>","children":null,"spread":false},{"title":"static_files_server.ts <span style='color:#111;'> 449B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 734B </span>","children":null,"spread":false},{"title":".vscode","children":[{"title":"settings.json <span style='color:#111;'> 180B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"node","children":[{"title":"index.js <span style='color:#111;'> 2.24KB </span>","children":null,"spread":false},{"title":"package.json <span style='color:#111;'> 312B </span>","children":null,"spread":false},{"title":"package-lock.json <span style='color:#111;'> 16.06KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 652B </span>","children":null,"spread":false}],"spread":true},{"title":"rust","children":[{"title":"src","children":[{"title":"main.rs <span style='color:#111;'> 1.28KB </span>","children":null,"spread":false},{"title":"demo_ws.rs <span style='color:#111;'> 3.58KB </span>","children":null,"spread":false}],"spread":true},{"title":"Cargo.toml <span style='color:#111;'> 392B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 562B </span>","children":null,"spread":false}],"spread":true},{"title":"go","children":[{"title":"main.go <span style='color:#111;'> 2.55KB </span>","children":null,"spread":false},{"title":"go.sum <span style='color:#111;'> 175B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 400B </span>","children":null,"spread":false},{"title":"go.mod <span style='color:#111;'> 81B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明