简体   繁体   English

如何对服务器发送的事件进行负载测试

[英]How to loadtest server sent events

I have a node service that streams data via SSE ( https://www.npmjs.com/package/sse-channel ). 我有一个通过SSE( https://www.npmjs.com/package/sse-channel )传输数据的节点服务。 I would like to loadtest this service my making 'n' concurrent connections, i tried the "loadtest" npm module but since we are dealing with streaming responses i was not able to report back any data like requests per second, mean latency etc… when the streaming requests are made, is there a way to use "loadtest" module for streaming services if not can someone point me to the module that would report back status while making concurrent streaming requests. 我想通过建立“ n”个并发连接对该服务进行负载测试,我尝试了“ loadtest” npm模块,但是由于我们正在处理流式响应,因此我无法报告任何数据,例如每秒请求,平均等待时间等。发出流请求,是否有办法使用“ loadtest”模块提供流服务,如果不能有人将我指向在发出并发流请求时会报告状态的模块。

Gatling ( http://gatling.io/#/ ) has support for SSE ( http://gatling.io/docs/2.2.2/http/sse.html ). 加特林( http://gatling.io/#/ )支持SSE( http://gatling.io/docs/2.2.2/http/sse.html )。 It's not in js, it's Scala. 它不在js中,而是Scala。 But, it's quite simple to write a scenario that targets a SSE server. 但是,编写针对SSE服务器的方案非常简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM