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

Benchmark envelop-only vs deep field matching #46

Open
embano1 opened this issue Sep 27, 2022 · 5 comments
Open

Benchmark envelop-only vs deep field matching #46

embano1 opened this issue Sep 27, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@embano1
Copy link
Member

embano1 commented Sep 27, 2022

What is your idea?

Discussed with @baldawar that it would be nice to know, e.g. in README.md whether it's preferable to pattern match on envelop (first-level) fields only or whether there's no significant impact on a match at a lower-level, e.g. Detail.someField.

Would you be willing to make the change?

Maybe, need advise on Java benchmarking.

Additional context

n/a

@embano1 embano1 added the enhancement New feature or request label Sep 27, 2022
@baldawar
Copy link
Collaborator

This requires a new benchmark test within https://github.com/aws/event-ruler/blob/main/src/test/software/amazon/event/ruler/Benchmarks.java that compares performance at different depths.

If the results are noteworthy, then we should also update the performance section within the readme https://github.com/aws/event-ruler/blob/main/README.md#performance

@timbray
Copy link
Collaborator

timbray commented Sep 30, 2022

To be honest I doubt there's much difference. But worth checking.

@baldawar
Copy link
Collaborator

baldawar commented Oct 6, 2022

It'll be helpful to have the test focus on depth at different levels more than just envelope vs detail. I've seen some code regress horribly as depth increases because of the data-structures in use while traversing downwards into JSON.

@timbray
Copy link
Collaborator

timbray commented Oct 6, 2022

The matching cost shouldn't differ in the slightest, but the flattening can obviously be affected… I think it'll probably be O(N) in something like the total number of field-steps.

@embano1
Copy link
Member Author

embano1 commented Oct 12, 2022

Interesting findings in Quamina :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants