问题
I have a node service that streams data via 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.
回答1:
Gatling (http://gatling.io/#/) has support for SSE (http://gatling.io/docs/2.2.2/http/sse.html). It's not in js, it's Scala. But, it's quite simple to write a scenario that targets a SSE server.
来源:https://stackoverflow.com/questions/40048289/how-to-loadtest-server-sent-events