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

Enhance performance tool #710

Closed
Closed
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5ca0c50
add pattern subscribe
harryteng9527 Sep 13, 2022
4b3daa5
tracker support printing sticky partitions
harryteng9527 Sep 14, 2022
cc7d9c3
add sticky partitions to file writer
harryteng9527 Sep 14, 2022
9df8d5f
Merge branch 'main' into enhance-per-tool
harryteng9527 Sep 14, 2022
66f0d4b
spotless
harryteng9527 Sep 14, 2022
ae0db49
Merge 'main' into enhance-per-tool
harryteng9527 Sep 16, 2022
fe48a0f
fix conflit
harryteng9527 Sep 22, 2022
5ea22f2
Merge branch 'main' into enhance-per-tool
harryteng9527 Sep 23, 2022
c3bfc23
delete recording sticky partition of each consumer
harryteng9527 Sep 23, 2022
4f1164d
support printing sticky partition
harryteng9527 Sep 27, 2022
7402d26
Merge branch 'main' into enhance-per-tool
harryteng9527 Sep 27, 2022
a649f2a
fix TrackerTest#testConsumerPrinter
harryteng9527 Sep 27, 2022
6791cef
spotless
harryteng9527 Sep 27, 2022
1b56589
add recordListener to pass client ID & listener
harryteng9527 Sep 28, 2022
edc830b
Merge branch 'main' into enhance-per-tool
harryteng9527 Sep 28, 2022
06df7a9
Merge branch and fix conflict
harryteng9527 Oct 9, 2022
e415c24
delete RecordListener and record partition in consumer
harryteng9527 Oct 11, 2022
ccdabd5
Merge branch 'main' into enhance-per-tool
harryteng9527 Oct 11, 2022
c84cecb
Merge branch 'main' into enhance-per-tool
harryteng9527 Oct 12, 2022
f9d7f08
fix some style and add comments
harryteng9527 Oct 12, 2022
30a84ad
Merge branch 'main' into enhance-per-tool
harryteng9527 Oct 14, 2022
8647028
delete detecting client id if it's null
harryteng9527 Oct 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix TrackerTest#testConsumerPrinter
harryteng9527 committed Sep 27, 2022
commit a649f2ae18376a5b34616d21c3b783648c8b1bc8
Original file line number Diff line number Diff line change
@@ -454,8 +454,6 @@ public void onPartitionAssigned(Set<TopicPartition> partitions) {
nowPartitions = partitions;
diffPartitions.retainAll(prevPartitions);
stickyNumbers.put(clientId, diffPartitions.size());
System.out.println(clientId + " now assignment = " + nowPartitions);
System.out.println(clientId + " previous assignment = " + prevPartitions);
}

@Override
Original file line number Diff line number Diff line change
@@ -141,7 +141,8 @@ boolean tryToPrint(Duration duration) {
for (var i = 0; i < reports.size(); ++i) {
var report = reports.get(i);
var ms = metrics.stream().filter(m -> m.clientId().equals(report.clientId())).findFirst();
var stickyNumber = Performance.RecordListener.stickyNumbers.get(report.clientId());
var clientId = report.clientId() == null ? "temp" : report.clientId();
var stickyNumber = Performance.RecordListener.stickyNumbers.get(clientId);
if (ms.isPresent()) {
System.out.printf(
" consumer[%d] has %d partitions and %d sticky partitions%n",