Skip to content

An initial test setup#239

Open
theAnuragMishra wants to merge 2 commits into
hoytech:masterfrom
theAnuragMishra:seed-data
Open

An initial test setup#239
theAnuragMishra wants to merge 2 commits into
hoytech:masterfrom
theAnuragMishra:seed-data

Conversation

@theAnuragMishra

Copy link
Copy Markdown
Contributor

This pr adds a pseudo-random events generator perl script for the purposes of dev and testing.

Usage:
from the repo root, run ./scripts/generate-seed-data.sh.
For options see ./scripts/generate-seed-data.sh --help.

@Thunder-Blaze

Copy link
Copy Markdown
Contributor

I think we could use Cpanel::JSON::XS while keeping JSON::PP as fallback in case someone wants to generate high amount of seed data to test

https://stackoverflow.com/questions/14591444/which-perl-module-would-you-recommend-for-json-manipulation

@theAnuragMishra

Copy link
Copy Markdown
Contributor Author

Is complicating really worth it... I didn't feel it was slow generating 100k events.

@Thunder-Blaze

Copy link
Copy Markdown
Contributor

Is complicating really worth it... I didn't feel it was slow generating 100k events.

I don't think it's that complicated, and as I said it'll be better in general for the users if they want to generate larger dataset (1-10M) not 100K

@hoytech

hoytech commented Jun 4, 2026

Copy link
Copy Markdown
Owner

I agree, there's no need to optimise for performance here.

Since this will only be used in the test suite (right?) can we please keep it all contained in the test/ directory, for clarity?

@theAnuragMishra theAnuragMishra changed the title add seed data generator An initial test setup Jun 11, 2026
Comment thread test/filterFuzzTest.pl Outdated
}
} elsif ($cmd eq 'scan-limit') {
while (1) {
for (1.100) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Missing a .?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed!

Comment thread test/filterFuzzTest.pl
jb55
damus
chat
nosuchtopic

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

nosuchtopic is there to test for topics that for sure won't have matches, maybe we can continue to push something similar on too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added!

Comment thread test/generate-seed-data.pl Outdated
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