Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artillery 2.x compatibility #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

eeggenberger
Copy link

We also needed the HTTP response times of HTTP requests embedded in socket.io scenarios, as the issue that referenced #13, so I thought I'd have a look at what it would mean to improve the Artillery 2.x compatibility. Seems like upgrading the dependency and changing the imports in the plug-in is all that's required to get it running with the new version.

There are probably more changes required to make use of new features in 2.x, but our existing test run as before, but now with the benefit of HTTP response times in the reports.

@eeggenberger
Copy link
Author

I've added further changes to get the same metrics as with Artillery's native Socket.io engine.

@ptejada ptejada self-assigned this Jun 18, 2024
@ptejada ptejada self-requested a review June 18, 2024 22:27
@@ -160,8 +161,8 @@ SocketIoEngine.prototype.step = function (requestSpec, ee) {
let delegateFunc = self.httpDelegate.step(requestSpec, ee);
return delegateFunc(context, callback);
}
ee.emit('counter', 'engine.socketio.emit', 1);
ee.emit('rate', 'engine.socketio.emit_rate');
ee.emit('counter', 'socketio.emit', 1);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the rationale for this change? is this a broader artillery 2.0 change or?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I've adapted the way metrics are tracked from artillery 2.0 (see https://github.com/artilleryio/artillery/blob/main/packages/core/lib/engine_socketio.js) so they will show up properly in reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants