-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Suggestion to Add "iter_lines" Support for "FastHttpUser" in Locust #3018
Comments
Hi @MasterKey-Pro ! I would love to have this feature added. Have you looked at implementing it? I guess the stuff already in gevenhttpclient (https://github.com/geventhttpclient/geventhttpclient/tree/2e9c0a0f73b18ddb83fe8e62c57123daee9112f5?tab=readme-ov-file#streaming) is not enough for your use case? |
Hello @cyberw ! Thank you so much for your attention and support regarding my feature suggestion. I truly appreciate the excellent work you have done on the project. I noticed that geventhttpclient already provides the necessary capabilities to handle streaming responses effectively. However, by implementing the iter_lines functionality directly in FastHttpUser, we can offer a more integrated and user-friendly solution that aligns seamlessly with the existing user interface. This approach would enhance usability by allowing users to easily handle streaming data without additional setup or complex configurations. That said, I am concerned that my modifications might affect other functionalities or introduce unforeseen issues within the project. To address this, I have attached my code suggestions below for further discussion and improvement:
I greatly appreciate your support and assistance, and I hope my suggestions can contribute positively to the project’s development. If there are any questions or if further discussion is needed, please feel free to contact me. |
Looks good! I wouldn't bother making it a mixin though, just add the Also:
|
Prerequisites
Description
In testing AI services using HTTP Server-Sent Events (SSE), HttpUser allows handling of streaming data efficiently. However, using FastHttpUser for performance benefits isn't feasible due to its lack of streaming support.
Proposed Enhancement:
Implement iter_lines support in FastHttpUser to process streaming responses efficiently.
Maintain the performance benefits that FastHttpUser offers.
Benefits:
Expands FastHttpUser to handle real-time data and streaming APIs.
Simplifies testing by allowing users to utilize performance benefits without additional handling logic.
Provides consistent capabilities across user classes in Locust.
I believe this enhancement will increase Locust's versatility.
Thank you for considering this suggestion
The text was updated successfully, but these errors were encountered: