event-ruler
event-ruler copied to clipboard
Benchmark envelop-only vs deep field matching
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
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
To be honest I doubt there's much difference. But worth checking.
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.
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.
Interesting findings in Quamina
:)