Skip to main content

Module model

Module model 

Source
Expand description

Shared dump-loading model behind both output formats.

A dump is decoded into one Loaded per instance it contains — its instance_id, the shared schema registry, that instance’s intern table, and the flat list of records recovered from its shards (sorted into the global (ts_nanos, shard_id, local_seq) order). A single-process dump yields one Loaded; a merged dump yields one per process it bundles. The Parquet (crate::convert) and Chrome-trace (crate::trace) writers both build on &[Loaded], so a merged file decodes to exactly the same slice that loading its source dumps separately would — convert merged.bb is byte-identical to convert a.bb b.bb.

Structs§

Loaded
A single decoded instance: its identity, the (shared) registry, its intern table, and its recovered records. A dump file decodes to one of these per instance it contains.
Rec
One decoded record, attributed to a schema within its Loaded dump.

Functions§

load
Loads and decodes a dump from bytes, returning one Loaded per instance it contains. path is carried for diagnostics. A single-process dump yields a one-element vec; a merged dump yields one entry per process it bundles, each with its own intern table, host, and records.
load_many
Loads several dumps in parallel (rayon), flattening each file’s instances. Files are returned in input order; instances within a file in ascending instance_id order.
record_key
Computes the RecordKey for a record within its owning Loaded.
unique_records
Returns a reference to every record across dumps, sorted into the global order (ts_nanos, instance_id, shard_id, event_id, fields), with duplicates removed.

Type Aliases§

RecordKey
The identity of a logged record, used both to order records globally and to drop duplicates when dumps overlap. The tuple is (ts_nanos, instance_id, shard_id, event_id, fields).