drain3
Fast log template extraction via fixed-depth prefix trees.
Parses log lines into tokens, clusters by prefix tree, replaces variables with <*> placeholders. Extracts parameters from previously unseen lines.
Usage
let samples = vec!;
let matcher = train?;
let = matcher.match_line;
assert!;
assert_eq!;
Performance
- First/last token prefilter — 3–5× speedup on typical workloads
- has_param_first quick rejection — instant rejection of non-matching first tokens
- Anchor checks — 2-comparison candidate rejection
License
Apache-2.0