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

feat: add a function test for read/write throttling #842

Merged
merged 19 commits into from
Dec 7, 2021

Conversation

Smityz
Copy link
Contributor

@Smityz Smityz commented Nov 24, 2021

Add a function test for throttle


if (test_plan.ot == operation_type::set) {
ref_count++;
pg_client->async_set(
Copy link
Contributor

@levy5307 levy5307 Nov 25, 2021

Choose a reason for hiding this comment

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

I think you can encapsulate different operations into several small functions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's difficult to capture all the related parameters like throttle_test_recorder is_running ref_count

result += chars[dsn::rand::next_u32(chars.size())];
}
return result;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

consider add the function into dsn::rand as common function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will do it in the next PR

@Smityz Smityz merged commit 9832438 into apache:master Dec 7, 2021
@Smityz Smityz deleted the throttle_test branch December 7, 2021 07:33
acelyc111 pushed a commit that referenced this pull request Jun 23, 2022
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.

3 participants