-
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
Locust while running as library with grpc client not outputting stats #1969
Comments
Interesting. I dont have time to look at it but hopefully someone will. Or maybe dig into the code base yourself. |
I am trying to see diff between non ui and ui code and so far nothing |
You should also update locust, just in case that matters. |
I had an almost identical issue when running Locust as a library, although I was using SFTP clients instead of grpc. I resolved my issue by using the .events attribute of the Environment object rather than the locust.events module. I do not know if this will work for you, but it may be worth a try. In your case, I would suggest modifying your Locustfile as so: I hope this works for you! |
The above solution worked for me. Thanks @BonelessPi |
Huh. Seems like a bug in the example GrpcClient. Anyone up for making a PR? |
Describe the bug
Grpc client not creating stats while running in library mode
Expected behavior
Stats should be created and available both in csv files and in api.
Actual behavior
The Csv files generated and logs created will have zero stats output
locust test have completed running
Steps to reproduce
The code is available here in github repo
https://github.com/saurabhsharma721/grpc_locust_stats_repro_prj
Environment
I see we have similar question on SO but want to check where to place request events inside the test. A code snippet will help
The text was updated successfully, but these errors were encountered: