Skip to content

KAFKA-17568 Rewrite TestPurgatoryPerformance by Java#17246

Merged
chia7712 merged 10 commits into
apache:trunkfrom
m1a2st:gh-KAFKA-17568
Oct 23, 2024
Merged

KAFKA-17568 Rewrite TestPurgatoryPerformance by Java#17246
chia7712 merged 10 commits into
apache:trunkfrom
m1a2st:gh-KAFKA-17568

Conversation

@m1a2st

@m1a2st m1a2st commented Sep 21, 2024

Copy link
Copy Markdown
Collaborator

Jira: https://issues.apache.org/jira/browse/KAFKA-17568
Move TestPurgatoryPerformance from Scala to Java, and transfer to use benchmark.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@github-actions github-actions Bot added core Kafka Broker performance labels Sep 21, 2024
@m1a2st

m1a2st commented Sep 29, 2024

Copy link
Copy Markdown
Collaborator Author
Benchmark (numKeys) (numPossibleKeys) (numRequests) (pct50) (pct75) (requestRate) (timeout) Mode Cnt Score Error Units
TestPurgatoryPerformance.testPurgatoryPerformance 3 100 100 0.5 0.75 10.0 1000 thrpt 15 ≈ 10⁻¹⁰ ops/ns
TestPurgatoryPerformance.testPurgatoryPerformance 3 100 100 0.5 0.75 10.0 1000 avgt 15 11568900851.367 ± 725751170.308 ns/op

@chia7712 chia7712 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@m1a2st could you please rebase code?

IntervalSamples intervalSamples = new IntervalSamples(1000000, requestRate);
CountDownLatch latch = new CountDownLatch(numRequests);

List<String> keys = IntStream.range(0, numRequests)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should prepare those objects before running benchmark.

@chia7712 chia7712 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@m1a2st the test pattern might not be easy to use with JMH. How about rewriting it in plain Java instead of using JMH?

@m1a2st

m1a2st commented Oct 22, 2024

Copy link
Copy Markdown
Collaborator Author

Thanks for your suggestion, I will change it to plain Java

@m1a2st

m1a2st commented Oct 22, 2024

Copy link
Copy Markdown
Collaborator Author

my local mashine can run the test
image

@chia7712 chia7712 merged commit 2ff1397 into apache:trunk Oct 23, 2024
@chia7712 chia7712 changed the title KAFKA-17568 Rewrite TestPurgatoryPerformance by JMH KAFKA-17568 Rewrite TestPurgatoryPerformance by Java Oct 23, 2024
abhishekgiri23 pushed a commit to abhishekgiri23/kafka that referenced this pull request Nov 2, 2024
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
chiacyu pushed a commit to chiacyu/kafka that referenced this pull request Nov 30, 2024
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
tedyu pushed a commit to tedyu/kafka that referenced this pull request Jan 6, 2025
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
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.

2 participants