-
Notifications
You must be signed in to change notification settings - Fork 119
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
Add write-messages-to-file option. #134
base: sockperf_v2
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch? |
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, cast msg_len
to size_t
as done in if (write_msg_file){ ... }
above.
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)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Maybe add a small comment here that we are checking for powers of 2? Fine either way.
Thanks for adding this write-messages-to-file option. This would be great to have. @igor-ivanov can you follow up on this? |
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.