INNER CODE UNIT · JavaScript
connectToSSE
Accenture/reactive-interaction-gateway · performance_tests/artillery/utils.js:22
function connectToSSE(userContext, events, done) {
const source = new EventSource(
'http://localhost:4000/_rig/v1/connection/sse'
);
const start = new Date();
source.addEventListener(
CONNECTION_CREATE_EVENT,
function (e) {
createHistogram(events, start, 'SSE connection time (msec)');
done();
},
false
);
}