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

Ensure that the last samples get sent by slave and received by master. #1025

Merged
merged 1 commit into from
Sep 26, 2019
Merged

Ensure that the last samples get sent by slave and received by master. #1025

merged 1 commit into from
Sep 26, 2019

Conversation

cyberw
Copy link
Collaborator

@cyberw cyberw commented Jun 11, 2019

No description provided.

@@ -321,6 +321,7 @@ def stop(self):
def quit(self):
for client in self.clients.all:
self.server.send_to_client(Message("quit", None, client.id))
gevent.sleep(0.5) # wait for final stats report from all slaves
Copy link
Contributor

Choose a reason for hiding this comment

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

This timing seems kind of arbitrary, is there a reason you went with 0.5?

Copy link
Member

Choose a reason for hiding this comment

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

that was my thought also.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it is kind of arbitrary, I'm assuming that the latency between master & slave is < .5s.

I tried explicitly waiting for one more event, but ran into issues. It could definitely be done better, but I didnt find a way to do it without adding a significant amount of logic.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@aldenpeterson-wf @cgoldberg Any more thoughts? The current behaviour is really bad (missed samples on master), so it needs some kind of fix...

Copy link
Member

Choose a reason for hiding this comment

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

I guess it could track which worker nodes have sent their reports, and then some timeout. But I think this is "good enough" and definitely better than the previous behaviour!

@mbeacom mbeacom merged commit d367cda into locustio:master Sep 26, 2019
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.

5 participants