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

Support user-defined scripts via Go plugins #7

Closed
kffl opened this issue Nov 2, 2021 · 0 comments · Fixed by #18
Closed

Support user-defined scripts via Go plugins #7

kffl opened this issue Nov 2, 2021 · 0 comments · Fixed by #18
Labels

Comments

@kffl
Copy link
Owner

kffl commented Nov 2, 2021

Since as of now, Gocannon only supports performing load tests, in which every HTTP request is identical, it might be useful to let the user programmatically alter the program's behavior during the load test so as to allow for executing more complex load testing scenarios.

While I initially wanted to avoid embedding a compiler/runtime like LuaJIT or V8 in Gocannon due to performance considerations, similar results can be achieved by implementing support for support for Go plugins, that would make it possible to inject custom logic at program startup, teardown as well as before and after each request is sent (in an aspect-oriented programming fashion). Development of a user-defined plugin would rely on creating a new package exposing a pre-defined interface and compiling it to a shared object, which would then be accessed and executed by Gocannon at runtime (i.e. with the path to the .so file provided via --plugin=path/to/plugin.so).

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

Successfully merging a pull request may close this issue.

1 participant