Add write-messages-to-file option. - #134
Open
apegushin wants to merge 1 commit into
Open
Conversation
|
Can one of the admins verify this patch? |
ChrisCoe
reviewed
Feb 13, 2021
| memcpy(write_msg_buf_aligned, msg, msg_len); | ||
| ssize_t wb = write(write_msg_fd, write_msg_buf_aligned, msg_len); | ||
|
|
||
| if (wb != msg_len) { |
Contributor
There was a problem hiding this comment.
For consistency, cast msg_len to size_t as done in if (write_msg_file){ ... } above.
ChrisCoe
reviewed
Feb 13, 2021
| const char *optarg = aopt_value(server_obj, OPT_WRITE_MSG_BUF_ALIGN); | ||
| long int alignment = strtol(optarg, NULL, 0); | ||
|
|
||
| if (alignment >= DEFAULT_BUF_ALIGNMENT && ((alignment & (alignment - 1)) == 0)) { |
Contributor
There was a problem hiding this comment.
Nice. Maybe add a small comment here that we are checking for powers of 2? Fine either way.
Contributor
|
Thanks for adding this write-messages-to-file option. This would be great to have. @igor-ivanov can you follow up on this? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This extends sockperf with ability to report RTT for a message that is being persisted on the server side with DSYNC and/or DIRECT flags. The purpose of this change is to have sockperf mimic a simple DB server.