Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Conversation

@dotnwat
Copy link
Member

@dotnwat dotnwat commented Apr 2, 2025

Currently unless we are in latest offset verifier mode, we only append zeros which is very compressible. Too compressible.

dotnwat added 3 commits April 2, 2025 11:48
this is useful to avoid needing to refactor other users of the generate
interface like kgo-repeater

Signed-off-by: Noah Watkins <[email protected]>
@dotnwat dotnwat requested review from WillemKauf and andrwng April 2, 2025 18:56
@WillemKauf
Copy link
Contributor

Please see my commit message here about why I reverted use of ValueGenerator::Generate():

3c87c1c

We should open a PR in redpanda to test CI with these changes before merging this.

@dotnwat
Copy link
Member Author

dotnwat commented Apr 2, 2025

made it faster and started ci run redpanda-data/redpanda#25704

WillemKauf
WillemKauf previously approved these changes Apr 2, 2025
Copy link
Contributor

@WillemKauf WillemKauf left a comment

Choose a reason for hiding this comment

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

please merge after CI finishes in redpanda-data/redpanda#25704

func Benchmark_old_random_payload1(b *testing.B) { benchmark_old_random_payload(10, b) }
func Benchmark_old_random_payload2(b *testing.B) { benchmark_old_random_payload(100, b) }
func Benchmark_old_random_payload3(b *testing.B) { benchmark_old_random_payload(1000, b) }
func Benchmark_old_random_payload10(b *testing.B) { benchmark_old_random_payload(10000, b) }
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: i know this is copypasta from elsewhere but if we're going to check this in we might as well make the Benchmark function names sensible (10,20,40 should be 4, 5, 6 to indicate number of zeros)

data := make([]byte, size)
for i := range data {
// printable ascii range
data[i] = byte(rand.Intn(126+1-32) + 32)
Copy link
Contributor

Choose a reason for hiding this comment

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

any good way to reuse the definition in valueGenerator? not a huge deal if not

Copy link
Member Author

Choose a reason for hiding this comment

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

i dunno. just choosing my battles

@dotnwat dotnwat merged commit dee8b80 into redpanda-data:main Apr 3, 2025
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants