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

fix wrk command #966

Merged
merged 1 commit into from
Mar 19, 2018
Merged

fix wrk command #966

merged 1 commit into from
Mar 19, 2018

Conversation

vladtcvs
Copy link
Contributor

If number of CPU is more than number of connection, create only number_of_connections threads

@vladtcvs vladtcvs requested a review from vankoven March 19, 2018 17:02
Copy link
Contributor

@vankoven vankoven left a comment

Choose a reason for hiding this comment

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

Aprooved, but answer to the question is desirable.

@@ -162,6 +162,8 @@ def form_command(self):
# count for remote node.
if self.threads == -1:
self.threads = remote.get_max_thread_count(self.node)
if self.threads > self.connections:
self.threads = self.connections
Copy link
Contributor

Choose a reason for hiding this comment

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

If self.connections is not multiple of self.threads, then wrk will establish only threads * (connections // threads) connections. The other connections % threads connections will be ignored. Is it worth to print warning in this case, what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, I will add such warning

@vladtcvs vladtcvs merged commit 43e35e9 into master Mar 19, 2018
@vladtcvs vladtcvs deleted the vlad-fix-wrk branch March 19, 2018 21:49
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.

2 participants