feat(eval): differential fuzz target, pipeline-ordering test, threshold sweep#105
Merged
Conversation
…sion test Add fuzz_eval_matcher_diff cargo-fuzz target that compares optimized (AhoCorasickSet / CaseInsensitiveGroup) matcher output against the unoptimized AnyOf(Contains) path on arbitrary needle/haystack inputs. Add optimizer_runs_after_pipeline_transformation regression test that verifies the compiler optimizer sees post-pipeline field names. Expose compiler::optimizer::optimize_any_of as pub so the fuzz crate can drive it directly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fuzz_eval_matcher_diffcargo-fuzz target that differentially tests the optimizer: comparesAnyOf(Contains(...))againstoptimize_any_of(...)on arbitrary needle/haystack inputs generated bylibfuzzer+arbitrary.optimizer_runs_after_pipeline_transformationregression test verifying the compiler optimizer sees post-pipeline field names (afield_name_mappingpipeline renamesCommandLinetoprocess.command_line, and the rule with 8|containspatterns still matches events using the ECS field name).compiler::optimizer::optimize_any_ofas#[doc(hidden)] pubso the fuzz crate can call it directly.eval_ac_threshold_sweepbenchmark (p1/p2/p4/p8/p16/p32 x h100/h1K/h8K/h64K). Results confirmAHO_CORASICK_THRESHOLD = 8is well-chosen: throughput flattens at p8, and p16/p32 perform nearly identically since the AC automaton scans the haystack once regardless of pattern count.Test plan
cargo test --workspacepassescargo fmt --all -- --checkcleancargo clippy --workspace --all-targets --all-features -- -D warningscleancargo checkinfuzz/compiles the new target