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

Add write-messages-to-file option. #134

Open
wants to merge 1 commit into
base: sockperf_v2
Choose a base branch
from
Open

Add write-messages-to-file option. #134

wants to merge 1 commit into from

Conversation

apegushin
Copy link

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.

@swx-jenkins2
Copy link

Can one of the admins verify this patch?

@igor-ivanov igor-ivanov self-assigned this Sep 8, 2020
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) {
Copy link
Contributor

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)) {
Copy link
Contributor

@ChrisCoe ChrisCoe Feb 13, 2021

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.

@ChrisCoe
Copy link
Contributor

Thanks for adding this write-messages-to-file option. This would be great to have.

@igor-ivanov can you follow up on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants