Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codag-megalith/codag-drain
/ functions
Functions
240 in github.com/codag-megalith/codag-drain
⨍
Functions
240
◇
Types & classes
41
↓ 82 callers
Method
len
(&self)
codag-drain/src/stream.rs:39
↓ 58 callers
Method
push
Ingest one line.
codag-drain/src/stream.rs:29
↓ 33 callers
Method
as_str
(&self)
drain3_rust/src/cluster.rs:45
↓ 22 callers
Method
add_log_message
Ingest a raw log line. Returns the (possibly new) cluster the message was assigned to and a tag describing what changed.
drain3_rust/src/drain.rs:58
↓ 22 callers
Method
is_empty
(&self)
codag-drain/src/stream.rs:43
↓ 15 callers
Function
authed
(req: Request<Body>)
examples/server/tests/integration.rs:58
↓ 14 callers
Function
template_logs
Template a batch of log lines.
codag-drain/src/compress.rs:279
↓ 14 callers
Function
v
(words: &[&str])
codag-drain/src/compress/template.rs:288
↓ 13 callers
Method
insert
Insert or update a cluster (touches LRU).
drain3_rust/src/storage.rs:27
↓ 12 callers
Function
metric_values
(rows: &[Metrics], f: fn(Metrics) -> f64)
codag-drain/tests/eval_loghub.rs:382
↓ 11 callers
Method
contains
(&self, id: &usize)
drain3_rust/src/storage.rs:64
↓ 11 callers
Method
len
(&self)
drain3_rust/src/storage.rs:78
↓ 10 callers
Function
app
()
examples/server/tests/integration.rs:40
↓ 9 callers
Function
bootstrap_mean_ci
(vals: &[f64])
codag-drain/tests/eval_loghub.rs:324
↓ 9 callers
Method
get_mut
Get a mutable reference, **promoting** the entry in the LRU.
drain3_rust/src/storage.rs:47
↓ 8 callers
Function
body_string
(resp: axum::response::Response)
examples/server/tests/integration.rs:35
↓ 8 callers
Function
error
(status: StatusCode, msg: impl Into<String>)
examples/server/src/routes.rs:78
↓ 8 callers
Function
lex
Tokenize by generic character classes while preserving byte spans.
codag-drain/src/compress/lex.rs:35
↓ 8 callers
Function
pred_from_kind
(kind: GrouperKind, lines: &[LogLine])
codag-drain/tests/eval_loghub.rs:405
↓ 8 callers
Function
s
(val: &str)
drain3_rust/src/tests.rs:4
↓ 7 callers
Method
get_template
(&self)
drain3_rust/src/cluster.rs:20
↓ 7 callers
Method
group
(&self, lines: &[LogLine])
codag-drain/src/compress/grouper.rs:114
↓ 7 callers
Function
parse_line
Heuristically parse one raw text line into a [`LogLine`]. The parser recognizes a leading ISO-like timestamp or epoch, then a level token among the n
codag-drain/src/input.rs:41
↓ 7 callers
Method
render
Render one compact text line per template group.
codag-drain/src/compress.rs:131
↓ 5 callers
Function
default_masking_instructions
Returns common masking patterns matching Python Drain3 defaults: - IP addresses - Hex sequences (0x...) - Numbers at word boundaries
drain3_rust/src/masking.rs:57
↓ 5 callers
Function
env_usize
(name: &str, default: usize)
examples/server/src/session.rs:51
↓ 5 callers
Function
router
Build the application router.
examples/server/src/routes.rs:40
↓ 5 callers
Function
sample_text
()
examples/server/tests/integration.rs:19
↓ 5 callers
Method
shutdown
Gracefully shut down the pipeline. Drops the sender (so the updater loop exits after processing remaining events) and awaits the updater task.
drain3_rust/src/pipeline.rs:87
↓ 5 callers
Function
to_lines
(contents: &[String])
codag-drain/tests/eval_loghub.rs:443
↓ 4 callers
Function
bootstrap_mean_delta_ci
(candidate: &[f64], baseline: &[f64])
codag-drain/tests/eval_loghub.rs:350
↓ 4 callers
Function
derive_multi_template
Multi-member derivation: a position is static iff *all* members share the same normalized token at that position (requires equal length). If members a
codag-drain/src/compress/template.rs:186
↓ 4 callers
Function
lines_of
(msgs: &[&str])
codag-drain/src/compress/grouper.rs:458
↓ 4 callers
Method
mask
Apply all masking rules sequentially, returning the masked string.
drain3_rust/src/masking.rs:40
↓ 4 callers
Method
match_default
Convenience wrapper - `match_log` with strategy `"never"`.
drain3_rust/src/drain.rs:136
↓ 4 callers
Function
parse_json_line
Parse one NDJSON line `{"message","level","timestamp"}`.
codag-drain/src/input.rs:89
↓ 4 callers
Function
sv
(vals: &[&str])
drain3_rust/src/tests.rs:8
↓ 4 callers
Method
values
(&self)
drain3_rust/src/storage.rs:71
↓ 3 callers
Method
add_log_message_from_tokens
Ingest a pre-tokenized log line. Same as [`add_log_message`] but skips tokenization - useful when preprocessing has already been done (e.g. in the co
drain3_rust/src/drain.rs:71
↓ 3 callers
Function
create_template
Merge two equal-length token sequences into a template. Matching positions keep the shared token; mismatches become `param_str`.
drain3_rust/src/similarity.rs:44
↓ 3 callers
Method
create_template_pub
Public template-creation helper (mainly for testing).
drain3_rust/src/drain.rs:151
↓ 3 callers
Function
csv_path
(dir: &Path, system: &str)
codag-drain/tests/eval_loghub.rs:66
↓ 3 callers
Function
derive_pair_template
Returns a conservative wildcard template (space-joined, placeholders collapsed) from two normalized token lists, using `a_raw`'s tokens for the equal-
codag-drain/src/compress/template.rs:160
↓ 3 callers
Function
finalize
Emit groups sorted by their smallest member index, members ascending.
codag-drain/src/compress/grouper.rs:62
↓ 3 callers
Function
get_opcodes
Compute alignment opcodes via classic LCS DP, then merge non-equal regions into single `Gap` blocks (so consecutive replace/insert/delete collapse).
codag-drain/src/compress/template.rs:73
↓ 3 callers
Function
is_anchor
(tok: &LexToken)
codag-drain/src/compress/lex.rs:83
↓ 3 callers
Function
limit
()
codag-drain/tests/eval_loghub.rs:50
↓ 3 callers
Function
loghub_dir
()
codag-drain/tests/eval_loghub.rs:44
↓ 3 callers
Function
make_drain_with_masking
()
drain3_rust/src/bench.rs:49
↓ 3 callers
Function
make_grouper
Build a `Box<dyn Grouper>` from the config.
codag-drain/src/compress/grouper.rs:33
↓ 3 callers
Function
parsed_lines
()
examples/server/tests/integration.rs:31
↓ 3 callers
Method
peek
Peek at a cluster **without** promoting it in the LRU.
drain3_rust/src/storage.rs:39
↓ 3 callers
Function
pred_from_grouper
Run one of our deterministic groupers and derive per-group templates through the same `Profile` path used by `template_logs`.
codag-drain/tests/eval_loghub.rs:392
↓ 3 callers
Function
read_rows
Read up to `n` `(Content, EventTemplate)` rows from a LogHub-2.0 structured CSV. Streams the file so the multi-GB systems (HDFS, BGL) never fully load
codag-drain/tests/eval_loghub.rs:73
↓ 3 callers
Method
set_masker
Set the log masker (applied before tokenization).
drain3_rust/src/drain.rs:165
↓ 3 callers
Function
systems
()
codag-drain/tests/eval_loghub.rs:57
↓ 3 callers
Function
token_is_anchor
(tok: &LexToken)
codag-drain/src/compress/lex.rs:139
↓ 2 callers
Function
collapse_placeholders
Port of `_collapse_placeholders`: drop a `<*>` that immediately follows another `<*>`.
codag-drain/src/compress/template.rs:37
↓ 2 callers
Function
compute_metrics
Compute GA, FGA, FTA, purity for a set of predicted groups against the per-line oracle `EventTemplate` strings. - **GA (line-weighted Group Accuracy)
codag-drain/tests/eval_loghub.rs:230
↓ 2 callers
Function
config_from_query
(q: &TemplateQuery, limits: &Limits)
examples/server/src/routes.rs:122
↓ 2 callers
Function
derive_lex_template
Render a multi-member template from lexical tokens. Positions are static only when every member has the same token text at that position. Dynamic pos
codag-drain/src/compress/lex.rs:93
↓ 2 callers
Function
drain_tokens
(line: &str, mode: DrainTokenMode, masker: &LogMasker)
codag-drain/src/compress/grouper.rs:157
↓ 2 callers
Function
f1
F1 over (correct / n_pred) precision and (correct / n_oracle) recall.
codag-drain/tests/eval_loghub.rs:303
↓ 2 callers
Method
fast_match
Score every candidate cluster and return the best one above `sim_th`.
drain3_rust/src/drain.rs:237
↓ 2 callers
Method
get_content_as_tokens
(&self, content: &str)
drain3_rust/src/drain.rs:174
↓ 2 callers
Function
get_seq_distance
Compute token-level similarity between a template (`seq1`) and a log message (`seq2`). Returns `(similarity, wildcard_count)` where similarity is the
drain3_rust/src/similarity.rs:8
↓ 2 callers
Function
github_jsonl
()
codag-drain/tests/eval_loghub.rs:103
↓ 2 callers
Function
github_limit
()
codag-drain/tests/eval_loghub.rs:109
↓ 2 callers
Function
group_count_from_kind
(kind: GrouperKind, lines: &[LogLine])
codag-drain/tests/eval_loghub.rs:447
↓ 2 callers
Function
iso_or_epoch_re
()
codag-drain/src/input.rs:12
↓ 2 callers
Function
limited_app
(limits: Limits)
examples/server/tests/integration.rs:44
↓ 2 callers
Function
line
(msg: &str)
codag-drain/src/stream.rs:60
↓ 2 callers
Function
line
(msg: &str)
codag-drain/src/compress.rs:347
↓ 2 callers
Function
median
Median over the FULL slice (incl. duplicates). Sorts a copy. Even-length = mean of the two middle elements (Python `statistics.median`).
codag-drain/src/compress/profile.rs:61
↓ 2 callers
Function
norm_ws
Whitespace-normalize a template string: collapse runs of whitespace to a single space, then trim. Used for FTA string comparison.
codag-drain/tests/eval_loghub.rs:205
↓ 2 callers
Function
num_re
`NUM = re.compile(r"-?\d+(?:\.\d+)?")` - first numeric substring of a slot.
codag-drain/src/compress/profile.rs:22
↓ 2 callers
Function
parse_limited_body
( headers: &HeaderMap, body_format_query: Option<&str>, body: &Bytes, limits: &Limits, )
examples/server/src/routes.rs:167
↓ 2 callers
Function
pred_from_drain3
Run base drain3 over the lines: each line's returned `cluster.cluster_id` is the predicted group; the final per-cluster `get_template()` (last seen) i
codag-drain/tests/eval_loghub.rs:417
↓ 2 callers
Function
pushed
(lines: &[LogLine], cfg: &TemplaterConfig)
codag-drain/src/stream.rs:64
↓ 2 callers
Function
read_github_rows
Read GitHub LoRA held-out rows as `(log line, oracle template)` pairs.
codag-drain/tests/eval_loghub.rs:169
↓ 2 callers
Function
regex_from_placeholder
Port of `regex_from_placeholder`, returning a *compiled* anchored regex. `<*>` -> `(.*?)`, the rest escaped, commas stripped, anchored `^...$`. Return
codag-drain/src/compress/template.rs:232
↓ 2 callers
Function
state_with_limits
(limits: Limits)
examples/server/tests/integration.rs:48
↓ 2 callers
Function
strip_commas
(s: &str)
codag-drain/src/compress/template.rs:223
↓ 2 callers
Function
template_token
(raw: &str, normalized: &str)
codag-drain/src/compress/template.rs:23
↓ 2 callers
Method
templates_with
(&self, config: &TemplaterConfig)
codag-drain/src/stream.rs:51
↓ 2 callers
Function
tokenize
(line: &str)
codag-drain/src/compress/template.rs:31
↓ 2 callers
Method
tree_search
Walk the prefix tree to find the best matching cluster.
drain3_rust/src/drain.rs:191
↓ 2 callers
Function
wants_json
(format: Option<&str>)
examples/server/src/routes.rs:139
↓ 2 callers
Function
whitespace_tokens
(line: &str, masker: &LogMasker)
codag-drain/src/compress/grouper.rs:141
↓ 1 callers
Method
add_seq_to_prefix_tree
Insert a newly created cluster into the prefix tree.
drain3_rust/src/drain.rs:278
↓ 1 callers
Function
anchor_chars
(tokens: &[LexToken], static_mask: &[bool])
codag-drain/src/compress/lex.rs:130
↓ 1 callers
Function
anchor_count
Count non-punctuation static anchors in a token vector/template mask.
codag-drain/src/compress/lex.rs:122
↓ 1 callers
Function
anchor_weight
(tok: &LexToken, idf: &HashMap<String, f64>)
codag-drain/src/compress/grouper.rs:323
↓ 1 callers
Function
auth_token_from_env
()
examples/server/src/session.rs:111
↓ 1 callers
Function
bench_concurrent_parallel
(logs: &[String], concurrency: usize)
drain3_rust/src/bench.rs:66
↓ 1 callers
Function
bench_concurrent_sequential
(logs: &[String])
drain3_rust/src/bench.rs:96
↓ 1 callers
Function
bench_sync
(logs: &[String])
drain3_rust/src/bench.rs:55
↓ 1 callers
Function
body_format
Decide the ingest body format: explicit `?body=text|ndjson`, else sniff the `Content-Type` header (`application/x-ndjson` / `application/json`), else
examples/server/src/routes.rs:148
↓ 1 callers
Function
build_samples
(lines: &[LogLine], group: &Group, cap: usize)
codag-drain/src/compress.rs:211
↓ 1 callers
Function
build_slot_summary
(profile: &Profile, g_idx: usize, si: usize, cap: usize)
codag-drain/src/compress.rs:225
next →
1–100 of 240, ranked by callers