-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[KIP-848] Added chaos and performance testing scripts #5203
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
base: master
Are you sure you want to change the base?
Conversation
🎉 All Contributor License Agreements have been signed. Ready to merge. |
8c7aabb
to
804659c
Compare
972fc6f
to
3d107ed
Compare
3d107ed
to
3931ae3
Compare
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.
Pull Request Overview
This PR adds three new performance and chaos testing scripts for KIP-848, focusing on consumer group rebalancing behavior. The implementation adds comprehensive test coverage for measuring rebalance performance with single and multiple consumers, as well as a chaos testing framework for validating consumer group stability under dynamic conditions.
- Introduces three new test files: single consumer rebalance performance test, multi-consumer rebalance performance test, and chaos testing for consumer groups
- Enhances the test framework with colored logging macros and improved consumer subscription functions
- Updates existing test files to use the new parameterized
test_consumer_wait_assignment
function
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
win32/tests/tests.vcxproj | Adds the three new test files to Windows build configuration |
tests/CMakeLists.txt | Adds the three new test files to CMake build configuration |
tests/test.h | Adds colored logging macros and updates function signatures for enhanced testing capabilities |
tests/test.c | Implements updated consumer subscription functions and wait assignment with configurable intervals |
tests/8002-rebalance-performance.c | Multi-consumer rebalance performance test with batched consumer creation |
tests/8003-chaos-testing-consumer-group.c | Chaos testing framework for consumer group stability validation |
tests/8004-rebalance-performance-single-consumer.c | Single consumer rebalance performance measurement test |
Multiple existing test files | Updates calls to use new parameterized test_consumer_wait_assignment function |
examples/rdkafka_performance.c | Adds group protocol configuration option for performance testing |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
*/ | ||
test_create_topic(NULL, topics[i], PARTITION_CNT, 1); | ||
} | ||
// Wait for topics to be created and propogated to all the brokers |
Copilot
AI
Oct 13, 2025
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.
Corrected spelling of 'propogated' to 'propagated'.
// Wait for topics to be created and propogated to all the brokers | |
// Wait for topics to be created and propagated to all the brokers |
Copilot uses AI. Check for mistakes.
*/ | ||
test_create_topic(NULL, topics[i], partition_cnt, 1); | ||
} | ||
// Wait for topics to be created and propogated to all the brokers |
Copilot
AI
Oct 13, 2025
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.
Corrected spelling of 'propogated' to 'propagated'.
// Wait for topics to be created and propogated to all the brokers | |
// Wait for topics to be created and propagated to all the brokers |
Copilot uses AI. Check for mistakes.
// if(test_consumer_group_protocol_classic()) { | ||
// TEST_SKIP("Skipping test for classic consumer group | ||
// protocol\n"); return 0; | ||
// } |
Copilot
AI
Oct 13, 2025
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.
Remove commented-out code. If this logic is needed for future use, consider using a feature flag or configuration parameter instead.
// if(test_consumer_group_protocol_classic()) { | |
// TEST_SKIP("Skipping test for classic consumer group | |
// protocol\n"); return 0; | |
// } |
Copilot uses AI. Check for mistakes.
// if(individual_batch_elapsed_time_ms[current_batch] > 3000) { | ||
// TEST_SAY_RED("Batch %d took too long: %llds and | ||
// %lldms\n", | ||
// current_batch + 1, | ||
// individual_batch_elapsed_time_ms[current_batch] | ||
// / 1000, | ||
// (individual_batch_elapsed_time_ms[current_batch] | ||
// % 1000)); | ||
// break; | ||
// } | ||
|
Copilot
AI
Oct 13, 2025
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.
Remove commented-out code. If this timeout logic is needed, consider making it configurable through a parameter or environment variable.
// if(individual_batch_elapsed_time_ms[current_batch] > 3000) { | |
// TEST_SAY_RED("Batch %d took too long: %llds and | |
// %lldms\n", | |
// current_batch + 1, | |
// individual_batch_elapsed_time_ms[current_batch] | |
// / 1000, | |
// (individual_batch_elapsed_time_ms[current_batch] | |
// % 1000)); | |
// break; | |
// } |
Copilot uses AI. Check for mistakes.
// TEST_SAY_WHITE("Producer %d finished producing messages for topic | ||
// %s\n", producer_args->producer_id, producer_args->topic); |
Copilot
AI
Oct 13, 2025
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.
Remove commented-out debug logging. If this logging is needed for debugging, consider using a debug flag or proper logging levels.
// TEST_SAY_WHITE("Producer %d finished producing messages for topic | |
// %s\n", producer_args->producer_id, producer_args->topic); |
Copilot uses AI. Check for mistakes.
// printf("Producer %d finished producing messages for topic %s\n", | ||
// producer_args->producer_id, producer_args->topic); |
Copilot
AI
Oct 13, 2025
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.
Remove commented-out debug logging. Use the TEST_SAY macros consistently for test output instead of printf.
// printf("Producer %d finished producing messages for topic %s\n", | |
// producer_args->producer_id, producer_args->topic); | |
TEST_SAY_MAGENTA("Producer %d finished producing messages for topic %s\n", | |
producer_args->producer_id, producer_args->topic); |
Copilot uses AI. Check for mistakes.
No description provided.